Skip to content

Conversation

darxriggs
Copy link
Contributor

This is to stay up-to-date and use the latest features and fixes.

@varyvol
Copy link

varyvol commented Jan 7, 2020

Closing to relaunch CI.

@varyvol varyvol closed this Jan 7, 2020
@varyvol varyvol reopened this Jan 7, 2020
@darxriggs darxriggs closed this Jan 7, 2020
@darxriggs darxriggs reopened this Jan 7, 2020
@darxriggs darxriggs closed this Jan 7, 2020
@darxriggs darxriggs reopened this Jan 7, 2020
@varyvol
Copy link

varyvol commented Jan 8, 2020

@darxriggs I'm merging this, the failures seem clearly related with infra issues. Thanks for your contribution!

@varyvol varyvol closed this Jan 28, 2020
@varyvol varyvol reopened this Jan 28, 2020
@varyvol
Copy link

varyvol commented Jan 28, 2020

@darxriggs sorry but the test failures seem to keep happening. Could you have a look? Thanks!

@darxriggs
Copy link
Contributor Author

I rebased on master and triggered the tests again, no luck. I have seen these issues on ci.jenkins.io and also locally already multiple times. It's just a timing issue. On Windows the temporary files created during testing cannot be removed because they are still locked. There is nothing I can do about.

@varyvol
Copy link

varyvol commented Jan 29, 2020

It's weird because master works fine. Something must be happening.

@darxriggs
Copy link
Contributor Author

@jenkinsci/code-reviewers These CI issues on Windows are known. Does anybody of you know about a fix on ci.jenkins.io?

@MarkEWaite
Copy link
Contributor

@darxriggs usually those messages on Windows computers indicate that there is a file handle still open to the files being deleted. It may be a test defect. It may be a defect in the production code. It usually requires analysis by someone that can watch it fail on Windows.

@jglick
Copy link
Member

jglick commented Feb 7, 2020

Yes, the CI failures likely indicate an actual problem: something holding a file lock.

@darxriggs
Copy link
Contributor Author

darxriggs commented Feb 7, 2020

I am currently already looking at it and can reproduce it locally.

@darxriggs
Copy link
Contributor Author

I seems it is due to this change ("Stop swallowing exceptions that happen in TestEnvironment#dispose()") that now reveals some covered problem

@darxriggs darxriggs changed the title Upgrade parent pom Upgrade parent pom & fix tests Feb 8, 2020
WorkflowRun workflowRun = Optional.ofNullable(p.scheduleBuild2(0))
.orElseThrow(AssertionFailedError::new)
.waitForStart();
SemaphoreStep.success("wait/1", workflowRun);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you suggest in the fix to only use SemaphoreStep.success("wait/1", null); here instead of replacing it with echo 'test' in the pipeline then let me know.

@darxriggs darxriggs changed the title Upgrade parent pom & fix tests Upgrade parent pom & fix InputStream leak & fix tests Feb 8, 2020
The newer jenkins-test-harness provided with this change does not
any longer swallow exceptions on test teardown. See
jenkinsci/jenkins-test-harness#166

This reveals problems in the implementation and tests. Under Windows
tests failed because some folders could not be removed due to open
file handles.

Fixes:

1) In `BaseFileContent` the `InputStream` was not closed correctly
in every case.

2) The `SemaphoreStep` was not used properly and anyway not required
in most cases. It has to be used correctly which requires 1-2 lines
of code in every test to not leave the environment in a bad state.
The platform-independent `echo` step is sufficient and requires no
extra code. Using no step at all may also be an option.
@varyvol
Copy link

varyvol commented Feb 10, 2020

@darxriggs please don't use force pushs because we lose history and it's harder to review.

@varyvol varyvol merged commit 581a02f into jenkinsci:master Feb 11, 2020
@darxriggs darxriggs deleted the upgrade-parent-pom branch February 11, 2020 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants