Skip to content
Snippets Groups Projects
Commit a88e2b5e authored by Simon Eismann's avatar Simon Eismann
Browse files

fixed constraint test

parent 5ad9fd99
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ public class PerformanceMetricsQueryConnectorImplTest { ...@@ -38,7 +38,7 @@ public class PerformanceMetricsQueryConnectorImplTest {
//Check if dof requests are enabled //Check if dof requests are enabled
PerformanceMetricsQueryConnectorImpl pmqc = new PerformanceMetricsQueryConnectorImpl(); PerformanceMetricsQueryConnectorImpl pmqc = new PerformanceMetricsQueryConnectorImpl();
pmqc.setConstraint("Acurate"); pmqc.setConstraint("Accurate");
ModelStructureQueryConnectorImpl msqc = new ModelStructureQueryConnectorImpl(); ModelStructureQueryConnectorImpl msqc = new ModelStructureQueryConnectorImpl();
if (!msqc.supportsDoFRequests()) if (!msqc.supportsDoFRequests())
fail("DoF requests are not supported!"); fail("DoF requests are not supported!");
...@@ -146,9 +146,9 @@ public class PerformanceMetricsQueryConnectorImplTest { ...@@ -146,9 +146,9 @@ public class PerformanceMetricsQueryConnectorImplTest {
@Parameters @Parameters
public static Collection<Object[]> data() { public static Collection<Object[]> data() {
return Arrays.asList(new Object[][] { return Arrays.asList(new Object[][] {
{"Acurate", 100000000.0, 10000000.0, 5.0}, {"Accurate", 0.95},
{null, 50000000.0, 5000000.0, 5.0}, {null, 0.95},
{"Fast", 200.0, 20.0, 5.0} {"Fast", 0.8}
}); });
} }
...@@ -156,13 +156,7 @@ public class PerformanceMetricsQueryConnectorImplTest { ...@@ -156,13 +156,7 @@ public class PerformanceMetricsQueryConnectorImplTest {
public String name; public String name;
@Parameter(value = 1) @Parameter(value = 1)
public Double runtime; public Double accuracy;
@Parameter(value = 2)
public Double warmUp;
@Parameter(value = 3)
public Double seconds;
@Test @Test
public void setConfigSettingsViaConstraintTest() { public void setConfigSettingsViaConstraintTest() {
...@@ -170,9 +164,7 @@ public class PerformanceMetricsQueryConnectorImplTest { ...@@ -170,9 +164,7 @@ public class PerformanceMetricsQueryConnectorImplTest {
pmqc.setConstraint(name); pmqc.setConstraint(name);
ConfigurationBuilder cb = new ConfigurationBuilder("dummy"); ConfigurationBuilder cb = new ConfigurationBuilder("dummy");
pmqc.setConfigSettingsViaConstraint(cb); pmqc.setConfigSettingsViaConstraint(cb);
assertEquals(runtime, cb.getTotalRunLength()); assertEquals(accuracy, cb.getAccuracy());
assertEquals(warmUp, cb.getWarmupPeriod());
assertEquals(seconds, cb.getSecondsBetweenStopChecks());
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment