summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tb3/TB3Runner.java
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni@vaadin.com>2014-06-03 12:58:56 +0300
committerJouni Koivuviita <jouni@vaadin.com>2014-06-03 15:09:11 +0300
commitad452a36795b764aeea2b00e3ceed2bae75d7949 (patch)
tree9b522f8b93464520430d839ab1608fa372efe23a /uitest/src/com/vaadin/tests/tb3/TB3Runner.java
parente65231e6028892bd6847777c5bad982b73278b14 (diff)
parent44eadeaa160152616152cd33f8181d7ab1fa3359 (diff)
downloadvaadin-framework-ad452a36795b764aeea2b00e3ceed2bae75d7949.tar.gz
vaadin-framework-ad452a36795b764aeea2b00e3ceed2bae75d7949.zip
Merge branch 'master' into valo
Conflicts: WebContent/release-notes.html build.properties client/src/com/vaadin/client/ApplicationConfiguration.java Change-Id: I36f075a03350e45c8666832142d7368891af3e59
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3/TB3Runner.java')
-rw-r--r--uitest/src/com/vaadin/tests/tb3/TB3Runner.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/TB3Runner.java b/uitest/src/com/vaadin/tests/tb3/TB3Runner.java
index 8b536858e5..69880008ff 100644
--- a/uitest/src/com/vaadin/tests/tb3/TB3Runner.java
+++ b/uitest/src/com/vaadin/tests/tb3/TB3Runner.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 Vaadin Ltd.
+ * Copyright 2000-2014 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
@@ -52,14 +52,22 @@ public class TB3Runner extends BlockJUnit4ClassRunner {
/**
* This is the total limit of actual JUnit test instances run in parallel
*/
- private static final int MAX_CONCURRENT_TESTS = 50;
+ private static final int MAX_CONCURRENT_TESTS;
/**
* This is static so it is shared by all tests running concurrently on the
* same machine and thus can limit the number of threads in use.
*/
- private static final ExecutorService service = Executors
- .newFixedThreadPool(MAX_CONCURRENT_TESTS);
+ private static final ExecutorService service;
+
+ static {
+ if (System.getProperty("useLocalWebDriver") != null) {
+ MAX_CONCURRENT_TESTS = 10;
+ } else {
+ MAX_CONCURRENT_TESTS = 50;
+ }
+ service = Executors.newFixedThreadPool(MAX_CONCURRENT_TESTS);
+ }
public TB3Runner(Class<?> klass) throws InitializationError {
super(klass);