-
Notifications
You must be signed in to change notification settings - Fork 218
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
Fix extra report folders creation #1498
Conversation
@@ -128,6 +128,9 @@ public void onStart(ITestContext context) { | |||
|
|||
@Override | |||
public void onTestStart(ITestResult result) { | |||
// create new folder for test report | |||
ReportContext.createNewTestDir(); |
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.
rather incorrect method naming... it doesn't generate new test dir)
@@ -473,6 +473,12 @@ public static void emptyTestDirData() { | |||
closeThreadLogAppender(); | |||
} | |||
|
|||
public static void createNewTestDir() { |
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.
why do we need this method?
@@ -128,7 +128,10 @@ public void onStart(ITestContext context) { | |||
|
|||
@Override | |||
public void onTestStart(ITestResult result) { | |||
// create new folder for test report | |||
ReportContext.createNewTestDir(StringUtils.EMPTY); |
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.
- rename to createTestDir
- implement 2 methods: one without args -> UUID for naming, and with actual parameter
Fixes #1488
Added functionality that creates test report folder on test start manually.
testDirectory
is nowInheritableThreadLocal
variable. When there is a new thread created while test runs, initial value oftestDirectory
is the same as at the parent thread.ThreadLogAppender now checks does bufferedWriter logs to current test directory.
Info logs work correctly, in debug log layer I found that some extra folders still arriving: for example,
OnAfterClass
(because TestLogAppender has already closed) and for running shutdown hook (because this log appears from special thread)