|
24 | 24 | import java.util.Optional;
|
25 | 25 | import java.util.concurrent.ScheduledExecutorService;
|
26 | 26 |
|
27 |
| -import static com.facebook.presto.spi.StandardErrorCode.QUERY_HAS_TOO_MANY_STAGES; |
| 27 | +import static com.facebook.presto.spi.StandardErrorCode.CLUSTER_HAS_TOO_MANY_RUNNING_TASKS; |
28 | 28 | import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
|
29 | 29 | import static org.testng.Assert.assertEquals;
|
30 | 30 | import static org.testng.Assert.assertFalse;
|
@@ -60,11 +60,11 @@ public void testMultipleQueriesKilledDueToTaskCount()
|
60 | 60 | assertTrue(largeQueryToBeKilled1.getFailureReason().isPresent(), "Query should be killed");
|
61 | 61 | Throwable failureReason1 = largeQueryToBeKilled1.getFailureReason().get();
|
62 | 62 | assertTrue(failureReason1 instanceof PrestoException);
|
63 |
| - assertEquals(((PrestoException) failureReason1).getErrorCode(), QUERY_HAS_TOO_MANY_STAGES.toErrorCode()); |
| 63 | + assertEquals(((PrestoException) failureReason1).getErrorCode(), CLUSTER_HAS_TOO_MANY_RUNNING_TASKS.toErrorCode()); |
64 | 64 | assertTrue(largeQueryToBeKilled2.getFailureReason().isPresent(), "Query should be killed");
|
65 | 65 | Throwable failureReason2 = largeQueryToBeKilled2.getFailureReason().get();
|
66 | 66 | assertTrue(failureReason2 instanceof PrestoException);
|
67 |
| - assertEquals(((PrestoException) failureReason2).getErrorCode(), QUERY_HAS_TOO_MANY_STAGES.toErrorCode()); |
| 67 | + assertEquals(((PrestoException) failureReason2).getErrorCode(), CLUSTER_HAS_TOO_MANY_RUNNING_TASKS.toErrorCode()); |
68 | 68 | }
|
69 | 69 | finally {
|
70 | 70 | scheduledExecutorService.shutdownNow();
|
@@ -93,7 +93,7 @@ public void testLargeQueryKilledDueToTaskCount_withClusterQueryTracker()
|
93 | 93 | assertFalse(smallQuery.getFailureReason().isPresent(), "small query should not be killed");
|
94 | 94 | Throwable failureReason = largeQueryToBeKilled.getFailureReason().get();
|
95 | 95 | assertTrue(failureReason instanceof PrestoException);
|
96 |
| - assertEquals(((PrestoException) failureReason).getErrorCode(), QUERY_HAS_TOO_MANY_STAGES.toErrorCode()); |
| 96 | + assertEquals(((PrestoException) failureReason).getErrorCode(), CLUSTER_HAS_TOO_MANY_RUNNING_TASKS.toErrorCode()); |
97 | 97 | }
|
98 | 98 | finally {
|
99 | 99 | scheduledExecutorService.shutdownNow();
|
|
0 commit comments