From dec366148bdfd1ffbc11c844f6239bfd46b7bd76 Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Fri, 14 Feb 2020 17:32:18 +0000 Subject: [PATCH] NOTICK: Add timeouts to serialization-djvm tests too. (#5967) --- .../net/corda/serialization/djvm/DeserializeOffsetTimeTest.kt | 2 +- .../src/test/kotlin/net/corda/serialization/djvm/TestBase.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/DeserializeOffsetTimeTest.kt b/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/DeserializeOffsetTimeTest.kt index 5d12059e0e..c23fe08ebe 100644 --- a/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/DeserializeOffsetTimeTest.kt +++ b/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/DeserializeOffsetTimeTest.kt @@ -13,7 +13,7 @@ import java.util.function.Function @ExtendWith(LocalSerialization::class) class DeserializeOffsetTimeTest : TestBase(KOTLIN) { @Test - fun `test deserializing instant`() { + fun `test deserializing offset time`() { val time = OffsetTime.now() val data = time.serialize() diff --git a/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/TestBase.kt b/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/TestBase.kt index 8533ce52f7..ae50b57eae 100644 --- a/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/TestBase.kt +++ b/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/TestBase.kt @@ -13,16 +13,19 @@ import net.corda.djvm.source.BootstrapClassLoader import net.corda.djvm.source.UserPathSource import org.junit.jupiter.api.AfterAll import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Timeout import org.junit.jupiter.api.fail import java.io.File import java.nio.file.Files.exists import java.nio.file.Files.isDirectory import java.nio.file.Path import java.nio.file.Paths +import java.util.concurrent.TimeUnit.MINUTES import java.util.function.Consumer import kotlin.concurrent.thread @Suppress("unused", "MemberVisibilityCanBePrivate") +@Timeout(5, unit = MINUTES) abstract class TestBase(type: SandboxType) { companion object { const val SANDBOX_STRING = "sandbox.java.lang.String"