From 22e96f1bda5aa396c5dd902565381a5186a35dec Mon Sep 17 00:00:00 2001 From: Balwant Kothari Date: Thu, 11 Jan 2024 18:15:19 +0530 Subject: [PATCH] ENT-11113 Instant default time resolution is nano but HashedDistributionList.PublicHeader default derialisation happens at millis resolution to passing time in millis resolution as input --- .../persistence/DBTransactionStorageLedgerRecoveryTests.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/node/src/test/kotlin/net/corda/node/services/persistence/DBTransactionStorageLedgerRecoveryTests.kt b/node/src/test/kotlin/net/corda/node/services/persistence/DBTransactionStorageLedgerRecoveryTests.kt index 8b3ecc64df..3eeb502392 100644 --- a/node/src/test/kotlin/net/corda/node/services/persistence/DBTransactionStorageLedgerRecoveryTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/persistence/DBTransactionStorageLedgerRecoveryTests.kt @@ -45,7 +45,6 @@ import net.corda.testing.node.internal.MockEncryptionService import org.assertj.core.api.Assertions.assertThat import org.junit.After import org.junit.Before -import org.junit.Ignore import org.junit.Rule import org.junit.Test import java.security.KeyPair @@ -173,12 +172,12 @@ class DBTransactionStorageLedgerRecoveryTests { } @Test(timeout = 300_000) - @Ignore("TODO JDK17:Fixme datetime format issue") fun `test lightweight serialization and deserialization of hashed distribution list payload`() { + val hashedDistList = HashedDistributionList( ALL_VISIBLE, mapOf(SecureHash.sha256(BOB.name.toString()) to NONE, SecureHash.sha256(CHARLIE_NAME.toString()) to ONLY_RELEVANT), - HashedDistributionList.PublicHeader(now(), 1) + HashedDistributionList.PublicHeader(Instant.ofEpochMilli(now().toEpochMilli()), 1) ) val roundtrip = HashedDistributionList.decrypt(hashedDistList.encrypt(encryptionService), encryptionService) assertThat(roundtrip).isEqualTo(hashedDistList)