Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix skip logic if test is skipped both on server and for some databases
If the Skip annotation is added to a test method with both server=true
and for a particular database, the test should only run if neither
applies.

Fixes the patch for bug 401069, which caused an error on the (actually
skipped) MySQL platform.

Signed-off-by: Sabine Heider <sabine.heider@sap.com>
  • Loading branch information
sabineheider committed Feb 28, 2013
1 parent b720c1e commit 28123de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Expand Up @@ -193,14 +193,7 @@ private <T extends Annotation> void skipMethod(FrameworkMethod method, RunNotifi
return;
}

if (skipper.runAll()) {
return;
}

if (skipper.runThis(a)) {
return;
}

// always check the database first
Class<? extends DatabasePlatform>[] databases = skipper.getDatabases(a);
String[] databaseNames = skipper.getDatabaseNames(a);

Expand Down Expand Up @@ -228,6 +221,14 @@ private <T extends Annotation> void skipMethod(FrameworkMethod method, RunNotifi
}
}
}

if (skipper.runAll()) {
return;
}

if (skipper.runThis(a)) {
return;
}

return;
}
Expand Down
Expand Up @@ -15,18 +15,15 @@

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;

import junit.framework.Assert;

import org.eclipse.persistence.platform.database.DerbyPlatform;
import org.eclipse.persistence.platform.database.MySQLPlatform;
import org.eclipse.persistence.platform.database.OraclePlatform;
import org.eclipse.persistence.platform.database.SQLServerPlatform;
import org.eclipse.persistence.testing.framework.wdf.JPAEnvironment;
import org.eclipse.persistence.testing.framework.wdf.Skip;
import org.eclipse.persistence.testing.framework.wdf.ToBeInvestigated;
import org.eclipse.persistence.testing.models.wdf.jpa1.fancy.Animal;
import org.eclipse.persistence.testing.models.wdf.jpa1.fancy.Element;
import org.eclipse.persistence.testing.models.wdf.jpa1.fancy.Plant;
Expand Down

0 comments on commit 28123de

Please sign in to comment.