You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DynamoDbEncryption/runtimes/java/src/test/sdkv1/com/amazonaws/services/dynamodbv2/datamodeling/TransformerHolisticIT.java
Copy file name to clipboardExpand all lines: DynamoDbEncryption/runtimes/java/src/test/sdkv1/com/amazonaws/services/dynamodbv2/datamodeling/encryption/providers/CachingMostRecentProviderTests.java
+32-11Lines changed: 32 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,9 @@
26
26
importjava.util.Map;
27
27
importjavax.crypto.SecretKey;
28
28
importjavax.crypto.spec.SecretKeySpec;
29
+
importorg.testng.annotations.AfterClass;
30
+
importorg.testng.annotations.AfterMethod;
31
+
importorg.testng.annotations.BeforeClass;
29
32
importorg.testng.annotations.BeforeMethod;
30
33
importorg.testng.annotations.Test;
31
34
@@ -47,30 +50,48 @@ public class CachingMostRecentProviderTests {
47
50
privatestaticfinalDynamoDBEncryptorENCRYPTOR =
48
51
DynamoDBEncryptor.getInstance(BASE_PROVIDER);
49
52
50
-
privateAmazonDynamoDBclient;
51
-
privateMap<String, Integer> methodCalls;
53
+
privatestaticAmazonDynamoDBrawClient;
54
+
privatestaticAmazonDynamoDBinstrumentedClient;
55
+
privatestaticMap<String, Integer> methodCalls;
52
56
privateProviderStorestore;
53
57
privateEncryptionContextctx;
54
58
59
+
// DDB Local client is created once per class since DynamoDBEmbedded.create() is expensive.
60
+
// Table is created/deleted per method to ensure test isolation, as tests assert
61
+
// exact DynamoDB call counts and expect a clean table with no leftover data.
Copy file name to clipboardExpand all lines: DynamoDbEncryption/runtimes/java/src/test/sdkv1/com/amazonaws/services/dynamodbv2/mapper/integration/DynamoDBTestBase.java
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@
21
21
importjava.util.Collection;
22
22
importjava.util.HashSet;
23
23
importjava.util.Set;
24
+
importorg.testng.annotations.AfterClass;
24
25
25
26
publicclassDynamoDBTestBase {
26
27
@@ -30,6 +31,14 @@ public static void setUpTestBase() {
30
31
dynamo = DynamoDBEmbedded.create().amazonDynamoDB();
0 commit comments