From a99e71d1b12e91145abb4ef262019351a256491f Mon Sep 17 00:00:00 2001 From: Kirill Grachev Date: Sat, 6 May 2023 19:14:44 +0300 Subject: [PATCH] SNRK-86: Works --- .../main/kotlin/space/kscience/snark/main/Main.kt | 2 +- .../space/kscience/snark/main/Acceptance.kt | 15 --------------- .../test/kotlin/space/kscience/snark/main/Test.kt | 13 +++++++++++++ 3 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 snark-main/src/test/kotlin/space/kscience/snark/main/Acceptance.kt create mode 100644 snark-main/src/test/kotlin/space/kscience/snark/main/Test.kt diff --git a/snark-main/src/main/kotlin/space/kscience/snark/main/Main.kt b/snark-main/src/main/kotlin/space/kscience/snark/main/Main.kt index 7b6e975..150ee58 100644 --- a/snark-main/src/main/kotlin/space/kscience/snark/main/Main.kt +++ b/snark-main/src/main/kotlin/space/kscience/snark/main/Main.kt @@ -7,7 +7,7 @@ import space.kscience.snark.ktor.SNARKServer import space.kscience.snark.storage.local.localStorage import kotlin.io.path.Path -fun main() = runBlocking { +fun main(): Unit = runBlocking { val port = 8080 val directory = localStorage(Path("./rundata")) val server = SNARKServer(ServerDataHolder(directory), port) diff --git a/snark-main/src/test/kotlin/space/kscience/snark/main/Acceptance.kt b/snark-main/src/test/kotlin/space/kscience/snark/main/Acceptance.kt deleted file mode 100644 index cf3e86b..0000000 --- a/snark-main/src/test/kotlin/space/kscience/snark/main/Acceptance.kt +++ /dev/null @@ -1,15 +0,0 @@ -package space.kscience.snark.main - -import kotlinx.coroutines.launch -import kotlinx.coroutines.runBlocking -import org.junit.jupiter.api.Test -import space.kscience.snark.ktor.SNARKServer -import space.kscience.snark.storage.local.localStorage -import kotlin.io.path.Path - -class Acceptance { - @Test - fun justWorks() = runBlocking { - main() - } -} \ No newline at end of file diff --git a/snark-main/src/test/kotlin/space/kscience/snark/main/Test.kt b/snark-main/src/test/kotlin/space/kscience/snark/main/Test.kt new file mode 100644 index 0000000..86d0824 --- /dev/null +++ b/snark-main/src/test/kotlin/space/kscience/snark/main/Test.kt @@ -0,0 +1,13 @@ +package space.kscience.snark.main + +import kotlinx.coroutines.delay +import kotlinx.coroutines.runBlocking +import org.junit.jupiter.api.Test + +class Test { + @Test + fun justWorks() = runBlocking { + delay(5) + main() + } +} \ No newline at end of file