-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add logging for flaky test #157
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for now .. over time we should fix and also change assertions to use assertj
@@ -123,6 +127,9 @@ public void testByRoutingRulesEngineFileChange() | |||
+ "actions:\n" | |||
+ " - \"result.put(\\\"routingGroup\\\", \\\"etl\\\")\""); | |||
fw.close(); | |||
file.getPath(); | |||
long etlLastModified = file.lastModified(); | |||
log.info("etl rule file created at: " + etlLastModified); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to change as temporal code, but we cloud use logger template:
log.info("etl rule file created at: {}", etlLastModified);
@@ -147,6 +154,9 @@ public void testByRoutingRulesEngineFileChange() | |||
+ "actions:\n" | |||
+ " - \"result.put(\\\"routingGroup\\\", \\\"etl2\\\")\""); // change from etl to etl2 | |||
fw.close(); | |||
long etl2LastModified = file.lastModified(); | |||
log.info("etl2 rule file created at: " + etl2LastModified); | |||
assertNotEquals(etl2LastModified, etlLastModified); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We could include message in assertion method instead of logging:
assertNotEquals(long unexpected, long actual, String message)
To address 123, we need to first add logging to determine if the file change is detectable by comparing timestamps with millisecond precision.