-
Notifications
You must be signed in to change notification settings - Fork 122
Making tests opt-out instead of opt-in and update TestVectorRunner #154
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
Conversation
43e0bf8
to
c973367
Compare
pom.xml
Outdated
<includes> | ||
<include>**/AllTestsSuite.java</include> | ||
</includes> | ||
<excludedGroups>slow</excludedGroups> |
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.
"full" would seem to indicate that we're running everything. If we're not running slow tests in "full", where are we running them?
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.
The only test marked as slow is FrameEncryptionHandlerVeryLongTest, which takes 3 hours to run. I'm not sure under what circumstances we would want to run it, but you can always manually run it. Would it be better if I renamed this tag to something like manualInvocationOnly?
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.
Are we stuck with the name "full-test-suite"? Why not just "test-suite"?
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.
I've renamed it to test-suite. I've also renamed the tag to be "ad_hoc", as I felt it was a little confusing having a "slow" tag and also a fastTestsOnly system property.
JUnit5 doesn't support test suites yet (see junit-team/junit5#744) and the existing test suites do not support the new JUnit5 tests that are being used for keyrings. This change removes the test suites, and configures Maven to include all tests except those marked with certain JUnit tags. Additionally, this change updates the TestVectorRunner to also test Keyrings and removes the redundant XCompat tests.
c973367
to
9c3e162
Compare
pom.xml
Outdated
<includes> | ||
<include>**/AllTestsSuite.java</include> | ||
</includes> | ||
<excludedGroups>slow</excludedGroups> |
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.
Are we stuck with the name "full-test-suite"? Why not just "test-suite"?
cachedData.putIfAbsent(plaintextUrl, readBytesFromJar(jar, plaintextUrl)); | ||
cachedData.putIfAbsent(ciphertextURL, readBytesFromJar(jar, ciphertextURL)); |
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.
This always reads the data from the JAR rather than only reading it if there is a cache miss. That might be expensive as I'm not sure how the data is being cached locally by Java. You could use computeIfAbsent
if you want though.
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.
Fixed
src/test/java/com/amazonaws/encryptionsdk/kms/KMSProviderBuilderIntegrationTests.java
Show resolved
Hide resolved
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.
LGTM!
…#151) * Incorporate Keyrings into AwsCrypto and deprecate MasterKeyProviders. * Update example code to use keyrings * Using try-with-resources for AwsCrypto streams * Splitting MKP and keyring unit tests * Making decryptData with ParsedCiphertext public * Mark KeyStoreProvider as deprecated * Reword some comments on the Basic Encryption example * Add test for compability of Keyrings with MasterKeyProviders * Create individual request types for each AwsCrypto method * Make EncryptionMaterials, DecryptionMaterials and KeyringTrace immutable * Rename KmsKeying and related classes to AwsKmsKeyring * Create builders for the standard keyrings * Create AwsKmsCmkId type to represent AWS KMS Key Ids * Add factory methods to Keyring builders * Add comment on not making a defensive copy of plaintext/ciphertext * Limit ability to create discovery AWS KMS Keyrings to explicit creation * Add withKeyring to CachingCMM builder * Fix DecryptRequestTest * Fix Junit 4 assertions in JUnit5 tests * Renaming StaticKeyring to TestKeyring * Adding convenience methods the create builders internally * Updating wording and adding more Deprecated annotations * Enable AwsKms Client Caching by default to match KmsMasterKeyProvider * Making tests opt-out instead of opt-in and update TestVectorRunner (#154) * Making tests opt-out instead of opt-in and update TestVectorRunner JUnit5 doesn't support test suites yet (see junit-team/junit5#744) and the existing test suites do not support the new JUnit5 tests that are being used for keyrings. This change removes the test suites, and configures Maven to include all tests except those marked with certain JUnit tags. Additionally, this change updates the TestVectorRunner to also test Keyrings and removes the redundant XCompat tests. * Client caching is now enabled by default in AwsKmsClientSupplier * Rename slow tag to ad_hoc and fix TestVectorRunner * Renaming StandardKeyring builder methods and other minors changes * Fixing test * Updating tests to use assertThrows * Additional example code for Keyrings (#155) * Additional example code for Keyrings * Updating wording * Remove AWS from AWS KMS keyring and make keyring lowercase
Description of changes:
JUnit5 doesn't support test suites yet (see junit-team/junit5#744) and the existing
test suites do not support the new JUnit5 tests that are being used for keyrings. This change removes the test
suites, and configures Maven to include all tests except those marked with certain JUnit tags.
Additionally, this change updates the TestVectorRunner to also test Keyrings and removes the redundant XCompat tests.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Check any applicable: