walterddr commented on code in PR #9937:
URL: https://github.com/apache/pinot/pull/9937#discussion_r1043938226
##########
pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/queries/ResourceBasedQueriesTest.java:
##########
@@ -280,7 +281,13 @@ private static Map<String, QueryTestCase> getTestCases()
if (testFileUrl != null && new File(testFileUrl.getFile()).exists()) {
Map<String, QueryTestCase> testCases = MAPPER.readValue(new
File(testFileUrl.getFile()),
new TypeReference<Map<String, QueryTestCase>>() { });
- // TODO: potential test case conflicts between files, address later by
throwing during setUp if already exist.
+ {
+ HashSet<String> hashSet = new HashSet<>(testCaseMap.keySet());
+ hashSet.retainAll(testCases.keySet());
+ if (!hashSet.isEmpty()) {
+ throw new IllegalArgumentException("testCase already exist for the
following names: " + hashSet);
+ }
+ }
Review Comment:
just realized that there was a test case name conflict and only the last
loaded one were executed. this should fix it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]