This is an automated email from the ASF dual-hosted git repository.
zachjsh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new de14f511d6 Fix broken ForkingTaskRunnerTest (#12499)
de14f511d6 is described below
commit de14f511d68fe9f8282164f53a7401bbf67011da
Author: zachjsh <[email protected]>
AuthorDate: Tue May 3 04:00:36 2022 -0400
Fix broken ForkingTaskRunnerTest (#12499)
A recent commit broke this test. This pr fixes the test.
---
.../org/apache/druid/indexing/overlord/ForkingTaskRunnerTest.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git
a/indexing-service/src/test/java/org/apache/druid/indexing/overlord/ForkingTaskRunnerTest.java
b/indexing-service/src/test/java/org/apache/druid/indexing/overlord/ForkingTaskRunnerTest.java
index 2ba8e9d59d..9e45d92ce5 100644
---
a/indexing-service/src/test/java/org/apache/druid/indexing/overlord/ForkingTaskRunnerTest.java
+++
b/indexing-service/src/test/java/org/apache/druid/indexing/overlord/ForkingTaskRunnerTest.java
@@ -499,6 +499,12 @@ public class ForkingTaskRunnerTest
@Override
int waitForTaskProcessToComplete(Task task, ProcessHolder processHolder,
File logFile, File reportsFile)
{
+ WorkerConfig workerConfig = new WorkerConfig();
+ Assert.assertEquals(1L, (long) this.getWorkerUsedTaskSlotCount());
+ Assert.assertEquals(workerConfig.getCapacity(), (long)
this.getWorkerTotalTaskSlotCount());
+ Assert.assertEquals(workerConfig.getCapacity() - 1, (long)
this.getWorkerIdleTaskSlotCount());
+ Assert.assertEquals(workerConfig.getCategory(),
this.getWorkerCategory());
+ Assert.assertEquals(workerConfig.getVersion(),
this.getWorkerVersion());
return 1;
}
};
@@ -507,5 +513,7 @@ public class ForkingTaskRunnerTest
Assert.assertTrue(e.getMessage().endsWith(ForkingTaskRunnerConfig.JAVA_OPTS_ARRAY_PROPERTY
+ " in context of task: " +
task.getId() + " must be an array of strings.")
);
+ Assert.assertEquals(1L, (long)
forkingTaskRunner.getWorkerFailedTaskCount());
+ Assert.assertEquals(0L, (long)
forkingTaskRunner.getWorkerSuccessfulTaskCount());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]