Skip to content

Commit 8895728

Browse files
basilevsiloveeclipse
authored andcommitted
Do not confuse background job failure with a planned stop #2323
Fixes #2323 The background payload has to be cancelled at the end of stress test. This was achieved with `Job.cancel()` method. The cancellation status from `subject.delete()` and `createInWorkspace()` was occasionally propagated to the verification stage of the test and resulted in false positive.
1 parent 48beaac commit 8895728

File tree

1 file changed

+3
-0
lines changed
  • resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression

1 file changed

+3
-0
lines changed

resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/IFileTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ public void testIssue2290() throws CoreException, InterruptedException, BrokenBa
160160
}
161161
}
162162
} catch (CoreException e) {
163+
if (e.getStatus().matches(IStatus.CANCEL)) {
164+
return Status.OK_STATUS;
165+
}
163166
return e.getStatus();
164167
} catch (BrokenBarrierException | InterruptedException e1) {
165168
return Status.error("Job has failed to start", e1);

0 commit comments

Comments
 (0)