Hello,
I have flaky tests in the external workspace manager, I am not sure how to
fix them since I use the latest parent pom (1.51), Jenkins 2.150.3 and its
BOM.
I suspect it has to do with the JenkinsRule, but I am not sure how to debug
that. Below is an example of a flaky test.
@Test
public void deleteWorkspace() throws Exception {
WorkflowRun run = createWorkflowJobAndRun(format("" +
"def extWorkspace = exwsAllocate diskPoolId: '%s' \n" +
"node ('linux') { \n" +
" exws (extWorkspace) { \n" +
" try { \n" +
" writeFile file: 'foo.txt', text: 'bar' \n" +
" } finally { \n" +
" step ([$class: 'WsCleanup']) \n" +
" } \n" +
" } \n" +
"}", DISK_POOL_ID));
j.assertBuildStatusSuccess(run);
j.assertLogContains("[WS-CLEANUP] Deleting project
workspace...[WS-CLEANUP] done", run);
assertThat(listFiles(tmp.getRoot(), nameFileFilter("foo.txt"),
directoryFileFilter()), hasSize(0));
}
Any advice on how to fix the flakiness?
Thanks,
Martin
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/56448720-59fa-4a3f-8c2d-9aa9d8ded5f4%40googlegroups.com.