summaryrefslogtreecommitdiffstats
path: root/tests/server-side
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-10-03 07:56:09 +0000
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-10-03 07:56:09 +0000
commite18d427d07ce7e3a3c4fa57bb340437580b44f3c (patch)
treef0dd2c2a795de4888a1a1d3514661150db565d64 /tests/server-side
parent2cdc6d4ba1019d751910e6ce0c44265f3d360720 (diff)
downloadvaadin-framework-e18d427d07ce7e3a3c4fa57bb340437580b44f3c.tar.gz
vaadin-framework-e18d427d07ce7e3a3c4fa57bb340437580b44f3c.zip
Fixed #7699
svn changeset:21494/svn branch:6.7
Diffstat (limited to 'tests/server-side')
-rw-r--r--tests/server-side/com/vaadin/tests/server/TestClassesSerializable.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/server-side/com/vaadin/tests/server/TestClassesSerializable.java b/tests/server-side/com/vaadin/tests/server/TestClassesSerializable.java
index f7beafb927..33c1dfaf5f 100644
--- a/tests/server-side/com/vaadin/tests/server/TestClassesSerializable.java
+++ b/tests/server-side/com/vaadin/tests/server/TestClassesSerializable.java
@@ -3,6 +3,7 @@ package com.vaadin.tests.server;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
+import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -14,6 +15,8 @@ import java.util.jar.JarFile;
import junit.framework.TestCase;
+import org.junit.Test;
+
public class TestClassesSerializable extends TestCase {
/**
@@ -70,6 +73,18 @@ public class TestClassesSerializable extends TestCase {
if (cls.isAnnotation() || cls.isSynthetic()) {
continue;
}
+ // Don't add classes that have a @Test annotation on any methods
+ boolean testPresent = false;
+ for (Method method : cls.getMethods()) {
+ if (method.isAnnotationPresent(Test.class)) {
+ testPresent = true;
+ break;
+ }
+ }
+ if (testPresent) {
+ continue;
+ }
+
// report non-serializable classes and interfaces
if (!Serializable.class.isAssignableFrom(cls)) {
nonSerializableClasses.add(cls);
@@ -164,6 +179,12 @@ public class TestClassesSerializable extends TestCase {
break;
}
}
+
+ // Don't add test classes
+ if (className.contains("Test")) {
+ ok = false;
+ }
+
if (ok) {
filteredClasses.add(className);
}