Skip to content

Commit

Permalink
Merge pull request #86 from fullstorydev/nickginther/query-benchmark-…
Browse files Browse the repository at this point in the history
…collection-name-verify

add check for empty collection in queryBenchmark
  • Loading branch information
patsonluk authored Dec 7, 2023
2 parents 74cefc1 + a6024e9 commit f8e2567
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/StressMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ private static Callable taskCallable(Workflow workflow, SolrCloud cloud, Map<Str
}
} else if (type.queryBenchmark != null) {
log.info("Running benchmarking task: "+ type.queryBenchmark.queryFile);
if (type.queryBenchmark.collection == null || type.queryBenchmark.collection.equals("")) {
throw new IllegalArgumentException("collection name is empty for queryBenchmark"+type.queryBenchmark.name);
}

// resolve the collection name using template
Map<String, String> solrurlMap = Map.of("SOLRURL", cloud.nodes.get(new Random().nextInt(cloud.nodes.size())).getBaseUrl());
Expand Down

0 comments on commit f8e2567

Please sign in to comment.