summaryrefslogtreecommitdiff
path: root/opendc-format-gwf/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-format-gwf/src/test')
-rw-r--r--opendc-format-gwf/src/test/kotlin/com/atlarge/opendc/format/trace/gwf/GwfTraceReaderTest.kt41
-rw-r--r--opendc-format-gwf/src/test/resources/trace.gwf4
2 files changed, 45 insertions, 0 deletions
diff --git a/opendc-format-gwf/src/test/kotlin/com/atlarge/opendc/format/trace/gwf/GwfTraceReaderTest.kt b/opendc-format-gwf/src/test/kotlin/com/atlarge/opendc/format/trace/gwf/GwfTraceReaderTest.kt
new file mode 100644
index 00000000..ca60f61d
--- /dev/null
+++ b/opendc-format-gwf/src/test/kotlin/com/atlarge/opendc/format/trace/gwf/GwfTraceReaderTest.kt
@@ -0,0 +1,41 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2019 atlarge-research
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package com.atlarge.opendc.format.trace.gwf
+
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.Test
+
+/**
+ * Test suite for the [GwfTraceReader] class.
+ */
+@DisplayName("GwfTraceReader")
+internal class GwfTraceReaderTest {
+ @Test
+ fun `should open from InputStream`() {
+ val input = GwfTraceReaderTest::class.java.getResourceAsStream("/askalon_workload_olde.gwf")
+ val reader = GwfTraceReader(input)
+ reader.close()
+ }
+}
diff --git a/opendc-format-gwf/src/test/resources/trace.gwf b/opendc-format-gwf/src/test/resources/trace.gwf
new file mode 100644
index 00000000..75b4c8d8
--- /dev/null
+++ b/opendc-format-gwf/src/test/resources/trace.gwf
@@ -0,0 +1,4 @@
+WorkflowID, JobID , SubmitTime, RunTime , NProcs , ReqNProcs , Dependencies
+0 , 1 , 50 , 13 , 1 , 1 ,
+1 , 2 , 64 , 13 , 1 , 1 ,
+1 , 3 , 1821 , 12 , 1 , 1 , 2