summaryrefslogtreecommitdiff
path: root/opendc-trace/opendc-trace-wfformat/src/test
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-06-06 16:21:21 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2022-06-07 15:46:53 +0200
commit2358257c1080b7ce78270535f82f0b960d48261a (patch)
treebced69c02698e85f995aa9935ddcfb54df23a64f /opendc-trace/opendc-trace-wfformat/src/test
parent61b6550d7a476ab1aae45a5b9385dfd6ca4f6b6f (diff)
refactor(trace/api): Introduce type system for trace API
This change updates the trace API by introducing a limited type system for the table columns. Previously, the table columns could have any possible type representable by the JVM. With this change, we limit the available types to a small type system.
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.kt6
-rw-r--r--opendc-trace/opendc-trace-wfformat/src/test/kotlin/org/opendc/trace/wfformat/WfFormatTraceFormatTest.kt16
2 files changed, 11 insertions, 11 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 e27bc82c..9d9735b1 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
@@ -210,7 +210,7 @@ internal class WfFormatTaskTableReaderTest {
val reader = WfFormatTaskTableReader(parser)
assertTrue(reader.nextRow())
- assertEquals("test", reader.get(TASK_ID))
+ assertEquals("test", reader.getString(TASK_ID))
assertFalse(reader.nextRow())
reader.close()
@@ -281,7 +281,7 @@ internal class WfFormatTaskTableReaderTest {
val reader = WfFormatTaskTableReader(parser)
assertTrue(reader.nextRow())
- assertEquals(setOf("1"), reader.get(TASK_PARENTS))
+ assertEquals(setOf("1"), reader.getSet(TASK_PARENTS, String::class.java))
assertFalse(reader.nextRow())
reader.close()
@@ -337,7 +337,7 @@ internal class WfFormatTaskTableReaderTest {
assertTrue(reader.nextRow())
assertTrue(reader.nextRow())
- assertEquals("test2", reader.get(TASK_ID))
+ assertEquals("test2", reader.getString(TASK_ID))
assertFalse(reader.nextRow())
reader.close()
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 4a8b2792..a460c5f6 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
@@ -66,18 +66,18 @@ class WfFormatTraceFormatTest {
assertAll(
{ assertTrue(reader.nextRow()) },
- { assertEquals("makebwaindex_mammoth_mt_krause.fasta", reader.get(TASK_ID)) },
- { assertEquals("eager-nextflow-chameleon", reader.get(TASK_WORKFLOW_ID)) },
- { assertEquals(172000, reader.get(TASK_RUNTIME).toMillis()) },
- { assertEquals(emptySet<String>(), reader.get(TASK_PARENTS)) },
+ { 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)) },
)
assertAll(
{ assertTrue(reader.nextRow()) },
- { assertEquals("makeseqdict_mammoth_mt_krause.fasta", reader.get(TASK_ID)) },
- { assertEquals("eager-nextflow-chameleon", reader.get(TASK_WORKFLOW_ID)) },
- { assertEquals(175000, reader.get(TASK_RUNTIME).toMillis()) },
- { assertEquals(setOf("makebwaindex_mammoth_mt_krause.fasta"), reader.get(TASK_PARENTS)) },
+ { 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)) },
)
reader.close()