From 79020710773720633f03a2c41df1cf711604e1ef Mon Sep 17 00:00:00 2001 From: Christopher Berner Date: Wed, 2 Nov 2016 11:41:01 -0700 Subject: [PATCH] Remove racy assertions from TestQueues These are not an important part of the test, and are inherently racy --- .../java/com/facebook/presto/execution/TestQueues.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/presto-tests/src/test/java/com/facebook/presto/execution/TestQueues.java b/presto-tests/src/test/java/com/facebook/presto/execution/TestQueues.java index 71ec395a3ab8..d33732667c29 100644 --- a/presto-tests/src/test/java/com/facebook/presto/execution/TestQueues.java +++ b/presto-tests/src/test/java/com/facebook/presto/execution/TestQueues.java @@ -76,38 +76,28 @@ private void testBasic(boolean resourceGroups) // wait for the first "dashboard" query to start waitForQueryState(queryRunner, firstDashboardQuery, RUNNING); - assertEquals(queryManager.getStats().getRunningQueries(), 1); - // submit second "dashboard" query QueryId secondDashboardQuery = createQuery(queryRunner, newDashboardSession(), LONG_LASTING_QUERY); // wait for the second "dashboard" query to be queued ("dashboard.${USER}" queue strategy only allows one "dashboard" query to be accepted for execution) waitForQueryState(queryRunner, secondDashboardQuery, QUEUED); - assertEquals(queryManager.getStats().getRunningQueries(), 1); - // submit first non "dashboard" query QueryId firstNonDashboardQuery = createQuery(queryRunner, newSession(), LONG_LASTING_QUERY); // wait for the first non "dashboard" query to start waitForQueryState(queryRunner, firstNonDashboardQuery, RUNNING); - assertEquals(queryManager.getStats().getRunningQueries(), 2); - // submit second non "dashboard" query QueryId secondNonDashboardQuery = createQuery(queryRunner, newSession(), LONG_LASTING_QUERY); // wait for the second non "dashboard" query to start waitForQueryState(queryRunner, secondNonDashboardQuery, RUNNING); - assertEquals(queryManager.getStats().getRunningQueries(), 3); - // cancel first "dashboard" query, second "dashboard" query and second non "dashboard" query should start running cancelQuery(queryRunner, firstDashboardQuery); waitForQueryState(queryRunner, firstDashboardQuery, FAILED); waitForQueryState(queryRunner, secondDashboardQuery, RUNNING); - - assertEquals(queryManager.getStats().getRunningQueries(), 3); } }