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

Update tests to use Junit 5 #252

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jasonkatonica
Copy link
Member

Tests have been updated to use Junit5. Changes made include:

  • Removing the junit-vintage-engine dependency. This is no longer in use given all tests now make use of Junit 5.
  • Tests are sorted by alphabetical in test suites.
  • Tests no longer need to extend junit.framework.TestCase.
  • Tests are explicitly declared with the @Test annotation.
  • Test constructors have been removed. Arguments to the base tests are now sent using getters and setters. This is typically only used for setting providers, algorithms, or key sizes in tests.
  • Various main() methods of tests were removed as they are no longer in use. Tests can be run using various Junit 5 test execution tools such as IDEs, command line tools, and mvn surefire which is already in place in this project.
  • BaseTest was removed as it is no longer in use and represents a Junit 3 test. A new BaseTestJunit5 test has been created to represent the new base for the test hierarchy.
  • The concept of warming up a test has been removed from a few locations. Tests are not expected to act as performance tests.
  • Copyrights were updated.
  • Various empty comment blocks were removed.
  • Some tests were not executing using the expected provider since the incorrect Utils class was in use. This was corrected to use the correct class.
  • Tests TestAESGCM_192, TestAESGCM_256, and TestRSA_4096 were added to the OpenJCEPlus and OpenJCEPlusFIPS provider test suites.
  • Tests TestECDHInteropBC, TestRSATypeCheckEnabled, TestAES_192, and TestAES_256 were added to the OpenJCEPlus provider test suite
  • Tests TestAES_192 and TestAES_256 were removed from the TestMultithreadFIPS since these tests take a long period of time to complete. Coverage functionally is still maintained since they are executed as part of the OpenJCEPlusFIPS provider tests.
  • Increased timeouts associated with tests TestMultithreadFIPS and TestMultithread.

Tests have been updated to use Junit5. Changes made include:
- Removing the `junit-vintage-engine` dependency. This is no longer
in use given all tests now make use of Junit 5.
- Tests are sorted by alphabetical in test suites.
- Tests no longer need to extend `junit.framework.TestCase`.
- Tests are explicitly declared with the `@Test` annotation.
- Test constructors have been removed. Arguments to the base tests are
now sent using getters and setters. This is typically only used for
setting providers, algorithms, or key sizes in tests.
- Various `main()` methods of tests were removed as they are no longer
in use. Tests can be run using various Junit 5 test execution tools
such as IDEs, command line tools, and `mvn` surefire which is already
in place in this project.
- `BaseTest` was removed as it is no longer in use and represents a
Junit 3 test. A new `BaseTestJunit5` test has been created to represent
the new base for the test hierarchy.
- The concept of warming up a test has been removed from a few
locations. Tests are not expected to act as performance tests.
- Copyrights were updated.
- Various empty comment blocks were removed.
- Some tests were not executing using the expected provider since the
incorrect `Utils` class was in use. This was corrected to use the
correct class.
- Tests `TestAESGCM_192`, `TestAESGCM_256`, and `TestRSA_4096` were
added to the `OpenJCEPlus` and `OpenJCEPlusFIPS` provider test suites.
- Tests `TestECDHInteropBC`, `TestRSATypeCheckEnabled`, `TestAES_192`,
and `TestAES_256` were added to the `OpenJCEPlus` provider test suite
- Tests `TestAES_192` and `TestAES_256` were removed from the
`TestMultithreadFIPS` since these tests take a long period of time to
complete. Coverage functionally is still maintained since they are
executed as part of the `OpenJCEPlusFIPS` provider tests.
- Increased timeouts associated with tests `TestMultithreadFIPS` and
`TestMultithread`.

Signed-off-by: Jason Katonica <[email protected]>
@jasonkatonica jasonkatonica force-pushed the katonica/feature/migratetojunit5 branch from d9f8b81 to 3235a02 Compare October 14, 2024 12:02
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.

2 participants