summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/tb3/AffectedTB3TestLocator.java21
-rw-r--r--uitest/src/com/vaadin/tests/tb3/ChangedTB3TestLocator.java5
-rw-r--r--uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java2
3 files changed, 12 insertions, 16 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/AffectedTB3TestLocator.java b/uitest/src/com/vaadin/tests/tb3/AffectedTB3TestLocator.java
index a3bee26675..9dfae77ca5 100644
--- a/uitest/src/com/vaadin/tests/tb3/AffectedTB3TestLocator.java
+++ b/uitest/src/com/vaadin/tests/tb3/AffectedTB3TestLocator.java
@@ -17,7 +17,9 @@ package com.vaadin.tests.tb3;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
public class AffectedTB3TestLocator extends TB3TestLocator {
@@ -42,21 +44,14 @@ public class AffectedTB3TestLocator extends TB3TestLocator {
private <T> List<Class<? extends T>> getAffectedTestClasses(
List<Class<? extends T>> allTestClasses,
List<Class<? extends T>> changedTestClasses) throws IOException {
- List<Class<? extends T>> affectedWithPackageTestClasses = getTestClassesWithAffectedPackageName(allTestClasses);
- List<Class<? extends T>> affectedTestClasses = new ArrayList<Class<? extends T>>();
- affectedTestClasses.addAll(affectedWithPackageTestClasses);
- // Removing duplicate entries before adding changed test classes.
- for (Class<? extends T> changedTestClass : changedTestClasses) {
- for (Class<? extends T> affectedTestClass : affectedWithPackageTestClasses) {
- if (!changedTestClass.getName().equals(
- affectedTestClass.getName())) {
- affectedTestClasses.add(changedTestClass);
+ Set testClasses = new HashSet(changedTestClasses);
+ testClasses
+ .addAll(getTestClassesWithAffectedPackageName(allTestClasses));
+
+ List<Class<? extends T>> affectedTestClasses = new ArrayList<Class<? extends T>>();
+ affectedTestClasses.addAll(testClasses);
- break;
- }
- }
- }
return affectedTestClasses;
}
diff --git a/uitest/src/com/vaadin/tests/tb3/ChangedTB3TestLocator.java b/uitest/src/com/vaadin/tests/tb3/ChangedTB3TestLocator.java
index a2f8ceeefa..a6f2e5191a 100644
--- a/uitest/src/com/vaadin/tests/tb3/ChangedTB3TestLocator.java
+++ b/uitest/src/com/vaadin/tests/tb3/ChangedTB3TestLocator.java
@@ -113,13 +113,14 @@ public class ChangedTB3TestLocator extends TB3TestLocator {
}
private boolean pathIsExcluded(String path) {
- // Exclude temporary junit files and screeenshots.
+ // Exclude temporary junit files and screenshots.
return path.startsWith("uitest/junit")
|| getScreenshotDirectory().contains(path);
}
private String getScreenshotDirectory() {
- return System.getProperty(PrivateTB3Configuration.SCREENSHOT_DIRECTORY);
+ return PrivateTB3Configuration
+ .getProperty(PrivateTB3Configuration.SCREENSHOT_DIRECTORY);
}
private List<DiffEntry> getDiffsInHead(Repository repository)
diff --git a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
index f2f4af3910..32d0f1065c 100644
--- a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
+++ b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
@@ -67,7 +67,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
}
}
- private static String getProperty(String name) {
+ protected static String getProperty(String name) {
String property = properties.getProperty(name);
if (property == null) {
property = System.getProperty(name);