mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Minor bugfix
This commit is contained in:
parent
02d853adf7
commit
36760a2a6e
|
@ -62,17 +62,17 @@ public class TestRunner {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(TestPlan testPlan) {
|
public void run(TestPlan testPlan) {
|
||||||
initSelenium();
|
init();
|
||||||
for (TestGroup group : testPlan.getGroups()) {
|
for (TestGroup group : testPlan.getGroups()) {
|
||||||
for (TestCase testCase : group.getTestCases()) {
|
for (TestCase testCase : group.getTestCases()) {
|
||||||
run(testPlan.getRuntimeScript(), testCase);
|
run(testPlan.getRuntimeScript(), testCase);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stopSelenium();
|
stop();
|
||||||
waitForCompletion();
|
waitForCompletion();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initSelenium() {
|
private void init() {
|
||||||
latch = new CountDownLatch(numThreads);
|
latch = new CountDownLatch(numThreads);
|
||||||
for (int i = 0; i < numThreads; ++i) {
|
for (int i = 0; i < numThreads; ++i) {
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
|
@ -101,7 +101,7 @@ public class TestRunner {
|
||||||
taskQueue.add(runnable);
|
taskQueue.add(runnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopSelenium() {
|
private void stop() {
|
||||||
stopped = true;
|
stopped = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,6 +124,7 @@ public class TestRunner {
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
log.info("Test failed: " + testCase.getTestMethod());
|
log.info("Test failed: " + testCase.getTestMethod());
|
||||||
localReport.get().add(TestResult.error(ref, null, null));
|
localReport.get().add(TestResult.error(ref, null, null));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
ObjectNode resultObject = (ObjectNode) mapper.readTree(result);
|
ObjectNode resultObject = (ObjectNode) mapper.readTree(result);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user