fix flaky RemoteTaskRunnerTest.testRunPendingTaskFailToAssignTask with ugly Thread.sleep (#13344)

This commit is contained in:
Clint Wylie 2022-11-10 00:58:53 -08:00 committed by GitHub
parent 27215d1ff1
commit 44f29030dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -568,6 +568,7 @@ public class RemoteTaskRunnerTest
public void testRunPendingTaskFailToAssignTask() throws Exception
{
doSetup();
Thread.sleep(100);
RemoteTaskRunnerWorkItem originalItem = remoteTaskRunner.addPendingTask(task);
// modify taskId to make task assignment failed
RemoteTaskRunnerWorkItem wankyItem = Mockito.mock(RemoteTaskRunnerWorkItem.class);