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

Avoid removal of non-test workspaces at the cleanup environment stage of selenium testing #8481

Merged
merged 6 commits into from
Jan 26, 2018

Conversation

dmytro-ndp
Copy link
Contributor

What does this PR do?

This PR get rid of code which removes all user's worskspaces after the all test executions.
Also it restores removal of test workspaces in the next cases:

What issues does this PR fix or reference?

#6829

Dmytro Nochevnov added 5 commits January 25, 2018 19:05
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
…sts list

Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
@dmytro-ndp dmytro-ndp added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/task Internal things, technical debt, and to-do tasks to be performed. team/production labels Jan 26, 2018
@@ -170,18 +171,23 @@ public void onFinish(ITestContext context) {}

@Override
public void onStart(ISuite suite) {
runningTests.clear();
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it was added for a good reason.
I would like to keep it here unless it brings issue.

Copy link
Contributor Author

@dmytro-ndp dmytro-ndp Jan 26, 2018

Choose a reason for hiding this comment

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

I was added it before to solve the problem which had gone since that time and now it causes another problem: missing clean up step for some test which being executed in the CheOneThreadTestsSuite.xml suite bacause when CheSuite.xml suite in turn starts execution, this command runningTests.clear() removes that test from SeleniumTestHandler::runningTests list and so prevents removal of test workspace which belongs to that test when SeleniumTestHandler::shutdown() method is executed;

@@ -82,6 +82,7 @@

private static final Logger LOG = LoggerFactory.getLogger(SeleniumTestHandler.class);
private static final AtomicBoolean isCleanUpCompleted = new AtomicBoolean();
private static final AtomicBoolean isWebDriverSessionCreationChecked = new AtomicBoolean();
Copy link
Contributor

Choose a reason for hiding this comment

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

If we invoke checkWebDriverSessionCreation in constructor then we won't needed this flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Thank you!

…stHandler

Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
@dmytro-ndp dmytro-ndp merged commit e7a5e97 into master Jan 26, 2018
@dmytro-ndp dmytro-ndp deleted the che-6829 branch January 26, 2018 15:40
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Jan 26, 2018
@benoitf benoitf added this to the 6.0.0-M5 milestone Jan 26, 2018
hkolvenbach pushed a commit to hkolvenbach/che that referenced this pull request Mar 2, 2018
…migration to master

* commit '47fe46a34fa1df988ed61d46e5a478e0f67675b7': (156 commits)
  Fixed build errors
  eclipse-che#6331 disable key binding handle when any 'Window' opened (eclipse-che#8473)
  changed info about known issue (eclipse-che#8483)
  Avoid removal of non-test workspaces at the cleanup environment stage of selenium testing (eclipse-che#8481)
  Add changes in the methods of checking git-marker in the page object 'CodenvyEditor'
  updated the command
  Use nightly stack by default and -Pdev for development
  Changes pvc name to a prefix + 8 random characters
  init and cli images should not use tag from CHE (eclipse-che#8474)
  CHE-7581 Improved keycloak initialization (eclipse-che#8425)
  CHE-8240: Switch to project explorer tab for reavel resources action. (eclipse-che#8460)
  Selenium: Create selenium tests to cover the authorization on GitHub (eclipse-che#8395)
  apply formating for 'CreateNewPackagesWithHelpCreationJavaClassTest' selenium test (eclipse-che#8464)
  remove read 'preferences' in try/catch block (eclipse-che#8463)
  add project build to CheckAutocompleteFeaturesInTheTestFolderTest (eclipse-che#8457)
  Selenium: Add try/catch block for displaying "Known issue" with eclipse-che#8300 bug (eclipse-che#8454)
  add info about known issue to FileStructureNodesTest selenium test (eclipse-che#8452)
  Remove "source" field from stack object (eclipse-che#8407)
  Selenium: Fix unexpected fail of MacrosCommandsEditorTest selenium test (eclipse-che#8441)
  Fix formatting (eclipse-che#8447)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants