Commit de890087 authored by Ihrig, Arvid Conrad (ari)'s avatar Ihrig, Arvid Conrad (ari)
Browse files

Integrated Pipeline: updated end-to-end tests

parent b04885ce
......@@ -15,15 +15,6 @@ import eu.nomad_lab.integrated_pipeline_tests.{ EndToEnd, PendingEndToEnd }
class UnderDevelopment extends LoggingTestAsyncWrapper with CustomMatchers {
"The Integrated Pipeline" when {
"invoked in console mode" should {
"skip parse requests for non-existent file tree and log a warning" taggedAs (EndToEnd, PendingEndToEnd) in { log =>
val f = new NonExistingTreeFixture(TreeType.Directory, OutputType.Json)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
atLeast(1, log.messages()) should (startWith("ERROR") and
includeAll("purely-imaginary", "not exist", "encountered failure", "ignoring task"))
}
}
}
}
}
......@@ -3,6 +3,7 @@ package eu.nomad_lab.integrated_pipeline_end_to_end_tests
import eu.nomad_lab.TreeType
import eu.nomad_lab.integrated_pipeline.{ Main, OutputType }
import eu.nomad_lab.integrated_pipeline_tests.EndToEnd
import eu.nomad_lab.integrated_pipeline_tests.helpers.CustomMatchers
import org.scalatest.AsyncWordSpec
/**
......@@ -12,13 +13,13 @@ import org.scalatest.AsyncWordSpec
* These tests validate some basic assumptions on the generated output, but the queries made are
* simple enough to assume that the tests are independent of the parser versions.
*/
class WorkingFeatures extends AsyncWordSpec {
class WorkingFeatures extends LoggingTestAsyncWrapper with CustomMatchers {
val metaInfo = Main.metaInfo
"The Integrated Pipeline" when {
"invoked in console mode with a single worker" should {
"process the given directory file tree and generate a json parse report for each calculation" taggedAs EndToEnd in {
"process the given directory file tree and generate a json parse report for each calculation" taggedAs EndToEnd in { () =>
val f = new SingleWorkerFixture(TreeType.Directory, OutputType.Json)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -26,7 +27,7 @@ class WorkingFeatures extends AsyncWordSpec {
}
}
"process the given directory file tree and generate a HDF5 parse report for each calculation" taggedAs EndToEnd in {
"process the given directory file tree and generate a HDF5 parse report for each calculation" taggedAs EndToEnd in { () =>
val f = new SingleWorkerFixture(TreeType.Directory, OutputType.HDF5)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -34,7 +35,7 @@ class WorkingFeatures extends AsyncWordSpec {
}
}
"process the given directory file tree and generate one merged HDF5 parse report for all calculations" taggedAs EndToEnd in {
"process the given directory file tree and generate one merged HDF5 parse report for all calculations" taggedAs EndToEnd in { () =>
val f = new SingleWorkerFixture(TreeType.Directory, OutputType.HDF5merged)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -42,7 +43,7 @@ class WorkingFeatures extends AsyncWordSpec {
}
}
"process the given rawdata zip archive and generate a json parse report for each calculation" taggedAs EndToEnd in {
"process the given rawdata zip archive and generate a json parse report for each calculation" taggedAs EndToEnd in { () =>
val f = new SingleWorkerFixture(TreeType.Zip, OutputType.Json)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -50,7 +51,7 @@ class WorkingFeatures extends AsyncWordSpec {
}
}
"process the given rawdata zip archive and generate a HDF5 parse report for each calculation" taggedAs EndToEnd in {
"process the given rawdata zip archive and generate a HDF5 parse report for each calculation" taggedAs EndToEnd in { () =>
val f = new SingleWorkerFixture(TreeType.Zip, OutputType.HDF5)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -58,7 +59,7 @@ class WorkingFeatures extends AsyncWordSpec {
}
}
"process the given rawdata zip archive and generate one merged HDF5 parse report for all calculations" taggedAs EndToEnd in {
"process the given rawdata zip archive and generate one merged HDF5 parse report for all calculations" taggedAs EndToEnd in { () =>
val f = new SingleWorkerFixture(TreeType.Zip, OutputType.HDF5merged)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -68,7 +69,7 @@ class WorkingFeatures extends AsyncWordSpec {
}
"invoked in console mode with multiple workers" should {
"process the given directory file tree and generate a json parse report for each calculation" taggedAs EndToEnd in {
"process the given directory file tree and generate a json parse report for each calculation" taggedAs EndToEnd in { () =>
val f = new MultiWorkerFixture(TreeType.Directory, OutputType.Json, 4)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -76,7 +77,7 @@ class WorkingFeatures extends AsyncWordSpec {
}
}
"process the given directory file tree and generate a HDF5 parse report for each calculation" taggedAs EndToEnd in {
"process the given directory file tree and generate a HDF5 parse report for each calculation" taggedAs EndToEnd in { () =>
val f = new MultiWorkerFixture(TreeType.Directory, OutputType.HDF5, 5)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -84,7 +85,7 @@ class WorkingFeatures extends AsyncWordSpec {
}
}
"process the given directory file tree and generate one merged HDF5 parse report for all calculations" taggedAs EndToEnd in {
"process the given directory file tree and generate one merged HDF5 parse report for all calculations" taggedAs EndToEnd in { () =>
val f = new MultiWorkerFixture(TreeType.Directory, OutputType.HDF5merged, 6)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -92,7 +93,7 @@ class WorkingFeatures extends AsyncWordSpec {
}
}
"process the given rawdata zip archive and generate a json parse report for each calculation" taggedAs EndToEnd in {
"process the given rawdata zip archive and generate a json parse report for each calculation" taggedAs EndToEnd in { () =>
val f = new MultiWorkerFixture(TreeType.Zip, OutputType.Json, 4)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -100,7 +101,7 @@ class WorkingFeatures extends AsyncWordSpec {
}
}
"process the given rawdata zip archive and generate a HDF5 parse report for each calculation" taggedAs EndToEnd in {
"process the given rawdata zip archive and generate a HDF5 parse report for each calculation" taggedAs EndToEnd in { () =>
val f = new MultiWorkerFixture(TreeType.Zip, OutputType.HDF5, 5)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -108,7 +109,7 @@ class WorkingFeatures extends AsyncWordSpec {
}
}
"process the given rawdata zip archive and generate one merged HDF5 parse report for all calculations" taggedAs EndToEnd in {
"process the given rawdata zip archive and generate one merged HDF5 parse report for all calculations" taggedAs EndToEnd in { () =>
val f = new MultiWorkerFixture(TreeType.Zip, OutputType.HDF5merged, 6)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
......@@ -116,6 +117,17 @@ class WorkingFeatures extends AsyncWordSpec {
}
}
}
"invoked in console mode" should {
"skip parse requests for non-existent file tree and log an error" taggedAs EndToEnd in { log =>
val f = new NonExistingTreeFixture(TreeType.Directory, OutputType.Json)
val finished = Main.mainWithFuture(f.generateConsoleArgumentList(Some(info)))
finished.map { _ =>
atLeast(1, log.messages()) should (startWith("ERROR") and
includeAll("purely-imaginary", "not exist", "encountered failure", "ignoring task"))
}
}
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment