@@ -498,7 +498,7 @@ public void testPrivileges() throws SQLException {
498498 @ Test
499499 public void testConcurrentCteQueries () throws Exception {
500500 final int threadCount = 3 ;
501- final int queriesPerThread = 20 ;
501+ final int queriesPerThread = 6 ;
502502 final AtomicInteger successCount = new AtomicInteger (0 );
503503 final AtomicInteger failureCount = new AtomicInteger (0 );
504504 final AtomicInteger totalCount = new AtomicInteger (0 );
@@ -527,7 +527,7 @@ public void testConcurrentCteQueries() throws Exception {
527527 // Test different types of CTE queries
528528 String [] queries = {
529529 String .format (
530- "WITH cte as %s (select * from testtb WHERE voltage > 150) select * from cte ORDER BY deviceid " ,
530+ "WITH cte as %s (select * from testtb WHERE voltage > 150 order by deviceid ) select * from cte" ,
531531 cteKeywords [j % cteKeywords .length ]),
532532 String .format (
533533 "WITH cte as %s (select deviceid, avg(voltage) as avg_v from testtb GROUP BY deviceid) select * from cte" ,
@@ -609,7 +609,7 @@ public void testConcurrentCteQueries() throws Exception {
609609 int totalQueries = threadCount * queriesPerThread ;
610610 assertEquals ("All queries should succeed" , totalQueries , successCount .get ());
611611 assertEquals ("No queries should fail" , 0 , failureCount .get ());
612- assertEquals ("Total query count should match" , 102 , totalCount .get ());
612+ assertEquals ("Total query count should match" , 30 , totalCount .get ());
613613 }
614614
615615 private static void prepareData () {
0 commit comments