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

Fixes #17079: Test files are not correctly clean #2877

Conversation

fanf
Copy link
Member

@fanf fanf commented Apr 8, 2020

@fanf fanf requested a review from amousset April 8, 2020 12:37
@fanf
Copy link
Member Author

fanf commented Apr 8, 2020

PR updated with a new commit

@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/2877
-- Your faithful QA
Kant merge: "To be is to do."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/22677/console)

Copy link
Member

@ncharles ncharles left a comment

Choose a reason for hiding this comment

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

there are unrelated changes in this PR

val t0 = System.nanoTime

for (i <- 1 to 100) {
val t0_0 = System.nanoTime
val result = ComplianceLevel.sum(source)
Copy link
Member

Choose a reason for hiding this comment

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

these should not be removed. They are used to warm the JVM, plus are not at all related to this ticket

Copy link
Member

@VinceMacBuche VinceMacBuche Apr 9, 2020

Choose a reason for hiding this comment

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

Those variable are unused, and really look like dead code, so definetly related to this issue

Copy link
Member Author

Choose a reason for hiding this comment

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

@ncharles if they are useful, we need a way to mark them as that. I regularly remove things that lead to warning or looks like dead code. At minima, they need to have:

  • a comment to explain why they are here,
  • a silent annotation to remove warning.
    Rudder should build with 0 warning

@fanf
Copy link
Member Author

fanf commented Apr 9, 2020

PR updated with a new commit

@fanf fanf requested a review from ncharles April 9, 2020 09:55
@@ -74,7 +75,9 @@ class HooksTest() extends Specification with AfterAll {
}

override def afterAll(): Unit = {
// tmp.delete()
if(System.getProperty("tests.clean.tmp") != "false") {
File("/tmp/rudder-test-hook/").delete()
Copy link
Member

Choose a reason for hiding this comment

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

In think @amousset will be very happy (test will now be cleaned up ....)

@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/2877
-- Your faithful QA
Kant merge: "Morality is not the doctrine of how we may make ourselves happy, but how we may make ourselves worthy of happiness."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/22788/console)

@fanf
Copy link
Member Author

fanf commented Apr 10, 2020

OK, squash merging this PR

@fanf fanf force-pushed the bug_17079/test_files_are_not_correctly_clean branch from f96efed to f929668 Compare April 10, 2020 09:34
@fanf fanf merged commit f929668 into Normation:branches/rudder/5.0 Apr 10, 2020
@fanf fanf deleted the bug_17079/test_files_are_not_correctly_clean branch March 15, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants