Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COLLECTIONS-812] fix flaky test due to timestamp comment inserted in… #306

Conversation

samabcde
Copy link
Contributor

@samabcde samabcde commented May 1, 2022

… Properties methods.

A comment line is inserted after the comment given when using Properties#save(OutputStream, String), Properties#store(OutputStream, String) and Properties#store(Writer, String)
e.g.#Sat Apr 30 22:00:30 HKT 2022. Hence the test will fail when actual, expected content are not written in same second. To fix the problem, comparison will ignore this comment

@kinow, should we keep using Properties#save for compatibility, or just use Properties#store and rename the method to testStore?

@samabcde samabcde changed the title [COLLECTIONS-812] fix flaky test due to timestamp comment inserted in… DRAFT [COLLECTIONS-812] fix flaky test due to timestamp comment inserted in… May 1, 2022
@samabcde samabcde force-pushed the COLLECTIONS-812_fix_flaky_EmptyPropertiesTest branch from a974633 to b377b9e Compare May 1, 2022 04:52
Copy link
Member

@kinow kinow left a comment

Choose a reason for hiding this comment

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

Superseded by #305 , I think :-)

@samabcde samabcde marked this pull request as draft May 1, 2022 04:53
@samabcde samabcde changed the title DRAFT [COLLECTIONS-812] fix flaky test due to timestamp comment inserted in… [COLLECTIONS-812] fix flaky test due to timestamp comment inserted in… May 1, 2022
@samabcde samabcde marked this pull request as ready for review May 1, 2022 05:01
@samabcde
Copy link
Contributor Author

samabcde commented May 4, 2022

@kinow , see your fix after I completed this, so I will close this PR. But please help to fix testStoreToOutputStream() and testStoreToPrintWriter() which are also using Properties#store and hence are also flaky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants