From e08ed087df5fca2594be9a194e58ae49d60e18c1 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Tue, 20 Oct 2015 23:12:13 +0300 Subject: [PATCH] Reduce number of tests by single Selenium connection from 100 to 20. Send quit command to Selenium. --- .../src/main/java/org/teavm/maven/SeleniumRunStrategy.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/maven/plugin/src/main/java/org/teavm/maven/SeleniumRunStrategy.java b/tools/maven/plugin/src/main/java/org/teavm/maven/SeleniumRunStrategy.java index ad09d1953..fdaeac6ed 100644 --- a/tools/maven/plugin/src/main/java/org/teavm/maven/SeleniumRunStrategy.java +++ b/tools/maven/plugin/src/main/java/org/teavm/maven/SeleniumRunStrategy.java @@ -56,15 +56,17 @@ public class SeleniumRunStrategy implements TestRunStrategy { @Override public void afterThread() { webDriver.get().close(); + webDriver.get().quit(); webDriver.remove(); } @Override public String runTest(Log log, String runtimeScript, TestCase testCase) throws IOException { commandsSent.set(commandsSent.get() + 1); - if (commandsSent.get().equals(100)) { + if (commandsSent.get().equals(20)) { commandsSent.set(0); webDriver.get().close(); + webDriver.get().quit(); webDriver.set(new RemoteWebDriver(url, DesiredCapabilities.firefox())); }