summaryrefslogtreecommitdiff
path: root/opendc-trace/opendc-trace-wfformat/src/test
diff options
context:
space:
mode:
authorDante Niewenhuis <d.niewenhuis@hotmail.com>2024-03-05 13:23:57 +0100
committerGitHub <noreply@github.com>2024-03-05 13:23:57 +0100
commit5864cbcbfe2eb8c36ca05c3a39c7e5916aeecaec (patch)
tree5b2773b8dc21c2e1b526fb70f829c376dd80532a /opendc-trace/opendc-trace-wfformat/src/test
parentd28002a3c151d198298574312f32f1cb43f3a660 (diff)
Updated package versions, updated web server tests. (#207)
* Updated all package versions including kotlin. Updated all web-server tests to run. * Changed the java version of the tests. OpenDC now only supports java 19. * small update * test update * new update * updated docker version to 19 * updated docker version to 19
Diffstat (limited to 'opendc-trace/opendc-trace-wfformat/src/test')
-rw-r--r--opendc-trace/opendc-trace-wfformat/src/test/kotlin/org/opendc/trace/wfformat/WfFormatTaskTableReaderTest.kt251
-rw-r--r--opendc-trace/opendc-trace-wfformat/src/test/kotlin/org/opendc/trace/wfformat/WfFormatTraceFormatTest.kt4
2 files changed, 134 insertions, 121 deletions
diff --git a/opendc-trace/opendc-trace-wfformat/src/test/kotlin/org/opendc/trace/wfformat/WfFormatTaskTableReaderTest.kt b/opendc-trace/opendc-trace-wfformat/src/test/kotlin/org/opendc/trace/wfformat/WfFormatTaskTableReaderTest.kt
index 0560d642..618cdf7d 100644
--- a/opendc-trace/opendc-trace-wfformat/src/test/kotlin/org/opendc/trace/wfformat/WfFormatTaskTableReaderTest.kt
+++ b/opendc-trace/opendc-trace-wfformat/src/test/kotlin/org/opendc/trace/wfformat/WfFormatTaskTableReaderTest.kt
@@ -69,11 +69,12 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testNoWorkflow() {
- val content = """
- {
- "name": "eager-nextflow-chameleon"
- }
- """.trimIndent()
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon"
+ }
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -88,12 +89,13 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testWorkflowArrayType() {
- val content = """
- {
- "name": "eager-nextflow-chameleon",
- "workflow": []
- }
- """.trimIndent()
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon",
+ "workflow": []
+ }
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -108,12 +110,13 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testWorkflowNullType() {
- val content = """
- {
- "name": "eager-nextflow-chameleon",
- "workflow": null
- }
- """.trimIndent()
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon",
+ "workflow": null
+ }
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -128,14 +131,15 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testNoJobs() {
- val content = """
- {
- "name": "eager-nextflow-chameleon",
- "workflow": {
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon",
+ "workflow": {
+ }
}
- }
- """.trimIndent()
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -146,12 +150,13 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testJobsObjectType() {
- val content = """
- {
- "name": "eager-nextflow-chameleon",
- "workflow": { "jobs": {} }
- }
- """.trimIndent()
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon",
+ "workflow": { "jobs": {} }
+ }
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -162,12 +167,13 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testJobsNullType() {
- val content = """
- {
- "name": "eager-nextflow-chameleon",
- "workflow": { "jobs": null }
- }
- """.trimIndent()
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon",
+ "workflow": { "jobs": null }
+ }
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -178,14 +184,15 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testJobsInvalidChildType() {
- val content = """
- {
- "name": "eager-nextflow-chameleon",
- "workflow": {
- "jobs": [1]
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon",
+ "workflow": {
+ "jobs": [1]
+ }
}
- }
- """.trimIndent()
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -196,18 +203,19 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testJobsValidChildType() {
- val content = """
- {
- "name": "eager-nextflow-chameleon",
- "workflow": {
- "jobs": [
- {
- "name": "test"
- }
- ]
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon",
+ "workflow": {
+ "jobs": [
+ {
+ "name": "test"
+ }
+ ]
+ }
}
- }
- """.trimIndent()
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -220,19 +228,20 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testJobsInvalidParents() {
- val content = """
- {
- "name": "eager-nextflow-chameleon",
- "workflow": {
- "jobs": [
- {
- "name": "test",
- "parents": 1,
- }
- ]
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon",
+ "workflow": {
+ "jobs": [
+ {
+ "name": "test",
+ "parents": 1,
+ }
+ ]
+ }
}
- }
- """.trimIndent()
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -243,19 +252,20 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testJobsInvalidParentsItem() {
- val content = """
- {
- "name": "eager-nextflow-chameleon",
- "workflow": {
- "jobs": [
- {
- "name": "test",
- "parents": [1],
- }
- ]
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon",
+ "workflow": {
+ "jobs": [
+ {
+ "name": "test",
+ "parents": [1],
+ }
+ ]
+ }
}
- }
- """.trimIndent()
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -266,19 +276,20 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testJobsValidParents() {
- val content = """
- {
- "name": "eager-nextflow-chameleon",
- "workflow": {
- "jobs": [
- {
- "name": "test",
- "parents": ["1"]
- }
- ]
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon",
+ "workflow": {
+ "jobs": [
+ {
+ "name": "test",
+ "parents": ["1"]
+ }
+ ]
+ }
}
- }
- """.trimIndent()
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -291,19 +302,20 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testJobsInvalidSecondEntry() {
- val content = """
- {
- "workflow": {
- "jobs": [
- {
- "name": "test",
- "parents": ["1"]
- },
- "test"
- ]
+ val content =
+ """
+ {
+ "workflow": {
+ "jobs": [
+ {
+ "name": "test",
+ "parents": ["1"]
+ },
+ "test"
+ ]
+ }
}
- }
- """.trimIndent()
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
@@ -315,25 +327,26 @@ internal class WfFormatTaskTableReaderTest {
@Test
fun testDuplicateJobsArray() {
- val content = """
- {
- "name": "eager-nextflow-chameleon",
- "workflow": {
- "jobs": [
- {
- "name": "test",
- "parents": ["1"]
- }
- ],
- "jobs": [
- {
- "name": "test2",
- "parents": ["test"]
- }
- ]
+ val content =
+ """
+ {
+ "name": "eager-nextflow-chameleon",
+ "workflow": {
+ "jobs": [
+ {
+ "name": "test",
+ "parents": ["1"]
+ }
+ ],
+ "jobs": [
+ {
+ "name": "test2",
+ "parents": ["test"]
+ }
+ ]
+ }
}
- }
- """.trimIndent()
+ """.trimIndent()
val parser = factory.createParser(content)
val reader = WfFormatTaskTableReader(parser)
diff --git a/opendc-trace/opendc-trace-wfformat/src/test/kotlin/org/opendc/trace/wfformat/WfFormatTraceFormatTest.kt b/opendc-trace/opendc-trace-wfformat/src/test/kotlin/org/opendc/trace/wfformat/WfFormatTraceFormatTest.kt
index 75f4b413..80a9d80e 100644
--- a/opendc-trace/opendc-trace-wfformat/src/test/kotlin/org/opendc/trace/wfformat/WfFormatTraceFormatTest.kt
+++ b/opendc-trace/opendc-trace-wfformat/src/test/kotlin/org/opendc/trace/wfformat/WfFormatTraceFormatTest.kt
@@ -81,7 +81,7 @@ class WfFormatTraceFormatTest {
{ assertEquals("makebwaindex_mammoth_mt_krause.fasta", reader.getString(TASK_ID)) },
{ assertEquals("eager-nextflow-chameleon", reader.getString(TASK_WORKFLOW_ID)) },
{ assertEquals(172000, reader.getDuration(TASK_RUNTIME)?.toMillis()) },
- { assertEquals(emptySet<String>(), reader.getSet(TASK_PARENTS, String::class.java)) }
+ { assertEquals(emptySet<String>(), reader.getSet(TASK_PARENTS, String::class.java)) },
)
assertAll(
@@ -89,7 +89,7 @@ class WfFormatTraceFormatTest {
{ assertEquals("makeseqdict_mammoth_mt_krause.fasta", reader.getString(TASK_ID)) },
{ assertEquals("eager-nextflow-chameleon", reader.getString(TASK_WORKFLOW_ID)) },
{ assertEquals(175000, reader.getDuration(TASK_RUNTIME)?.toMillis()) },
- { assertEquals(setOf("makebwaindex_mammoth_mt_krause.fasta"), reader.getSet(TASK_PARENTS, String::class.java)) }
+ { assertEquals(setOf("makebwaindex_mammoth_mt_krause.fasta"), reader.getSet(TASK_PARENTS, String::class.java)) },
)
reader.close()