Create enclave on demand to ensure there are no concurency issues (despite that being improbable)
@@ -78,8 +78,6 @@ public class MigrateDataCommandTest {
private TestConfig testConfig;
- private Enclave enclave;
-
public MigrateDataCommandTest(TestConfig testConfig) {
this.testConfig = testConfig;
}
@@ -172,7 +170,7 @@ public class MigrateDataCommandTest {
MigrationInfoFactory.create(inboundDbHelper);
- enclave = createEnclave(orionKeyHelper);
+
}
@After
@@ -246,6 +244,8 @@ public class MigrateDataCommandTest {
.map(PublicKey::from)
.get();
+ Enclave enclave = createEnclave(orionKeyHelper);
+
byte[] unencryptedTransaction = enclave.unencryptTransaction(encodedPayload,encryptionKey);
assertThat(unencryptedTransaction).isEqualTo(Base64.getDecoder().decode(expected));
