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

Fix zombie processes created by FullTeaching test suite #145

Conversation

augustocristian
Copy link
Contributor

This PR is related to #52 and closes #135, solves the remaining problem with the zombie processes, and improves the suite's maintainability and understability.
Contains the following improvements:

  • Now all test cases are parametrized and use common methods that set-up and tear-down the browsers and configuration files.
  • The second user and student drivers are managed globally, tearing down them when are used in the Chat-videocall cases.
  • replyToComment test, previosusly @disabled and now enabled and passing
  • Minor improvements suggested by Lint (e.g reemplace size()==0 by isEmpty()) and some rename of variables in the files that we modify.

Refractoring to the base test class, making all test cases parametrized
and avoiding differences between test cases
Also minor fixes related to smells that sonar and IntelliJ detect
@augustocristian augustocristian force-pushed the 135-flaky-regressions-due-to-reach-the-max-number-of-threads-with-fullteaching-test-suite branch 5 times, most recently from e7ee111 to 684a195 Compare August 18, 2024 14:50
@augustocristian augustocristian force-pushed the 135-flaky-regressions-due-to-reach-the-max-number-of-threads-with-fullteaching-test-suite branch from 684a195 to 05ffc25 Compare August 18, 2024 15:03
Copy link
Contributor

@javiertuya javiertuya left a comment

Choose a reason for hiding this comment

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

This PR is mixing too many things, and the goal was to fix a problem, not to refactor all tests. Please DO NOT SUBMIT THIS KIND OF PRs again.

Main issues:

  • duplicated code
  • handling of exceptions in tests

- Removing exceptions where its handling its not appropiate.
- Removing blank and double-blank lines
- Adding exception to logintest
- Not used imports
- Replace string concatenation with {}
- Replace <= lists with .empty method
@augustocristian
Copy link
Contributor Author

augustocristian commented Aug 20, 2024

Sorry for including a lot of changes in this PR @javiertuya. When I started to look for the problem with the zombie processes, I found several main causes, so I addressed all:

  • Have a set-up method in the parent method and in the ones that inheritance
  • Not use correctly try with resources
  • Not use DriverFactories and release the driver correctly.
  • The issue with the agent, that probably was my blame because originally I changed the way that you introduced to me to deploy the agent (using the docker command) to a docker-compose.

So I tried to manage all and try to include in the same PR the changes to resolve the problem.
The last commits have removed most of the exceptions from the test suite (was a common practice, I don't know if it was due to the non-expertise of the original developer) and removed the two-blank lines. I think that a complete refactoring of the code is needed also, but It implies to move-remove code, and it should introduce noise to the PR.

@javiertuya javiertuya merged commit 1fbb567 into main Aug 20, 2024
3 checks passed
@javiertuya javiertuya deleted the 135-flaky-regressions-due-to-reach-the-max-number-of-threads-with-fullteaching-test-suite branch August 20, 2024 14:18
@javiertuya
Copy link
Contributor

@augustocristian Some after-merge comments:

  • When removing some statements that make an inner block (e.g. if removing a try cach), it is acceptable to temporarily keep the original indentation if the block is large, so that, the changes that are shown in the PR reflect exactly the part of code that was removed. However, if the block is small, I thing that it would be better to correct the indentation of the block.
  • I've seen many statements with an inline comment that computes the number of lines or says anything else. These comments must be removed, eg.
            CourseNavigationUtilities.go2Tab(driver, HOME_ICON);//4 lines
            CourseNavigationUtilities.go2Tab(driver, SESSION_ICON);//4lines
            CourseNavigationUtilities.go2Tab(driver, FORUM_ICON);//4lines
            CourseNavigationUtilities.go2Tab(driver, FILES_ICON);//4lines
            CourseNavigationUtilities.go2Tab(driver, ATTENDERS_ICON);//4lines

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

Successfully merging this pull request may close these issues.

Flaky Regressions due to reach the max number of threads with FullTeaching test suite
2 participants