Gitlab service upgraded. Please report any problems to dl_gitadmin@cs.lth.se

Commit ff7d570b authored by Noric Couderc's avatar Noric Couderc

Removed test

The test was not deterministic.
parent b69dc522
......@@ -296,59 +296,6 @@ public class ApplicationTest {
r.featuresToCSV(data));
}
@Test
public void TestRunBenchmarks() throws InvocationTargetException, IllegalAccessException {
ApplicationRunner r = new ApplicationRunner();
List<Application<?>> apps =
new ListApplicationGenerator().createApplications(
0, 50, 100
);
List<TrainingSetValue> values =
r.runBenchmarks(apps).stream()
.sorted(Comparator.comparing(x -> x.getApplication().getIdentifier()))
.collect(Collectors.toList());
// We re-run the applications
List<TrainingSetValue> newValues =
r.runBenchmarks(apps)
.stream()
.sorted(Comparator.comparing(x -> x.getApplication().getIdentifier()))
.collect(Collectors.toList());
// If we re-run the benchmarks, we should get similar values
for (int i = 0; i < values.size(); ++i) {
TrainingSetValue expected = values.get(i);
TrainingSetValue newValue = newValues.get(i);
// We check we have indeed the same applications
Assert.assertEquals(
expected.getApplication().getIdentifier(),
newValue.getApplication().getIdentifier()
);
Assert.assertEquals(
expected.getRunningData().getMedian(),
newValue.getRunningData().getMedian(),
1// 0.001 s difference max
);
Assert.assertEquals(
expected.getDataStructure(),
newValue.getDataStructure()
);
if (!expected.getBestDataStructure().equals(newValue.getBestDataStructure())) {
System.out.println(expected.getApplication().getIdentifier());
System.out.println(newValue.getApplication().getIdentifier());
System.out.println(expected.getRunningData().getMedian());
System.out.println(newValue.getRunningData().getMedian());
System.out.println(expected.getBestDataStructure());
System.out.println(newValue.getBestDataStructure());
}
Assert.assertEquals(
expected.getBestDataStructure(),
newValue.getBestDataStructure()
);
}
}
@Test
public void TestApplicationGeneratorSpread() throws InvocationTargetException, IllegalAccessException {
ApplicationRunner r = new ApplicationRunner();
......
Markdown is supported
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