Merge pull request #7643 from corda/bk/os_fixes_412

ENT-11113 Update instant time resolution in test cases
This commit is contained in:
Adel El-Beik 2024-01-12 18:26:25 +00:00 committed by GitHub
commit d9e0172bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)