Author: mircea.markus
Date: 2009-02-16 09:25:32 -0500 (Mon, 16 Feb 2009)
New Revision: 7696
Added:
core/trunk/src/test/java/org/jboss/cache/TestNameVerifier.java
Modified:
core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationRejoinTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/mvcc/Buddy3NodesWithPoolNoDataGravitationTest.java
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/MoveCommandTest.java
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/PutDataMapCommandTest.java
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/VersionedInvalidateCommandTest.java
core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java
core/trunk/src/test/java/org/jboss/cache/config/parsing/CustomInterceptorsElementParserTest.java
core/trunk/src/test/java/org/jboss/cache/jmx/JmxManualTest.java
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/CacheJmxWrapperTest.java
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/InterceptorRegistrationTest.java
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LegacyConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LifecycleNotificationTest.java
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/OptimisticNotificationTest.java
core/trunk/src/test/java/org/jboss/cache/loader/UnnecessaryLoadingSetDataTest.java
core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationOptLocksTest.java
core/trunk/src/test/java/org/jboss/cache/profiling/MockAsyncReplTest.java
core/trunk/src/test/java/org/jboss/cache/profiling/ProfileMapViewTest.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/NonBlockingStateTransferTest.java
core/trunk/src/test/java/org/jboss/cache/transaction/MarkAsRollbackTest.java
core/trunk/src/test/java/org/jboss/cache/util/FastCopyHashMapTest.java
Log:
added test to check UT correctness
Modified: core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java 2009-02-13
19:07:47 UTC (rev 7695)
+++ core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -877,18 +877,18 @@
*/
public boolean invocationsAllowed(boolean originLocal)
{
- log.trace("Testing if invocations are allowed.");
+ if (trace) log.trace("Testing if invocations are allowed.");
if (state.allowInvocations()) return true;
// if this is a locally originating call and the cache is not in a valid state,
return false.
if (originLocal) return false;
- log.trace("Is remotely originating.");
+ if (trace) log.trace("Is remotely originating.");
// else if this is a remote call and the status is STARTING, wait until the cache
starts.
if (state == CacheStatus.STARTING && blockInStarting)
{
- log.trace("Cache is starting; block.");
+ if (trace) log.trace("Cache is starting; block.");
try
{
blockUntilCacheStarts();
Added: core/trunk/src/test/java/org/jboss/cache/TestNameVerifier.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/TestNameVerifier.java
(rev 0)
+++ core/trunk/src/test/java/org/jboss/cache/TestNameVerifier.java 2009-02-16 14:25:32 UTC
(rev 7696)
@@ -0,0 +1,209 @@
+package org.jboss.cache;
+
+import org.testng.annotations.Test;
+
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.io.FilenameFilter;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.PrintWriter;
+import java.io.BufferedReader;
+import java.io.FileReader;
+
+/**
+ * Class that tests that test names are correclty set for each test.
+ *
+ * @author Mircea.Markus(a)jboss.com
+ */
+@Test(groups = "functional", testName = "TestNameVerifier")
+public class TestNameVerifier {
+ String dir = "src\\test\\java\\org\\jboss\\cache";
+
+ Pattern packageLinePattern = Pattern.compile("package
org.jboss.cache[^;]*");
+ Pattern classLinePattern =
Pattern.compile("(abstract\\s*)??(public\\s*)(abstract\\s*)??class [^\\s]*");
+ Pattern atAnnotationPattern = Pattern.compile("@Test[^)]*");
+ Pattern testNamePattern =
Pattern.compile("testName\\s*=\\s*\"[^\"]*\"");
+
+ String fileCache;
+
+ FilenameFilter javaFilter = new FilenameFilter() {
+ public boolean accept(File dir, String name) {
+ if (dir.getAbsolutePath().contains("testng")) return false;
+ return name.endsWith(".java");
+ }
+ };
+
+ FileFilter onlyDirs = new FileFilter() {
+ public boolean accept(File pathname) {
+ return pathname.isDirectory();
+ }
+ };
+
+ @Test(enabled = false, description = "Do not enable this unless you want your
files to be updated with test names!!!")
+ public void process() throws Exception {
+ File[] javaFiles = getJavaFiles();
+ for (File file : javaFiles) {
+ if (needsUpdate(file)) {
+ System.out.println("Updating file: " + file.getAbsolutePath());
+ updateFile(file);
+ }
+ }
+ }
+
+ private void updateFile(File file) throws Exception {
+ String javaString = fileCache;
+ String testName = getTestName(javaString, file.getName());
+ String testNameStr = ", testName = \"" + testName +
"\"";
+ javaString = replaceAtTestAnnotation(javaString, testNameStr);
+ persistNewFile(file, javaString);
+ }
+
+ private void persistNewFile(File file, String javaString) throws Exception {
+ if (file.delete()) {
+ System.out.println("!!!!!!!!!! error porcessing file " +
file.getName());
+ return;
+ }
+ file.createNewFile();
+ PrintWriter writter = new PrintWriter(file);
+ writter.append(javaString);
+ writter.close();
+ }
+
+ private String replaceAtTestAnnotation(String javaString, String testNameStr) {
+ Matcher matcher = atAnnotationPattern.matcher(javaString);
+ boolean found = matcher.find();
+ assert found;
+ String theMatch = matcher.group();
+ return matcher.replaceFirst(theMatch + testNameStr);
+ }
+
+ private String getTestName(String javaString, String filename) {
+ String classNamePart = getClassNamePart(javaString, filename);
+
+ //abstract classes do not require test names
+ if (classNamePart.indexOf("abstract") >= 0) return null;
+
+ classNamePart = classNamePart.substring("public class ".length());
+ String packagePart = getPackagePart(javaString, filename);
+ //if the test is in org.horizon package then make sure no . is prepanded
+ String packagePrepend = ((packagePart != null) && (packagePart.length()
> 0)) ? packagePart + "." : "";
+ return packagePrepend + classNamePart;
+ }
+
+ private String getClassNamePart(String javaString, String filename) {
+ Matcher matcher = classLinePattern.matcher(javaString);
+ boolean found = matcher.find();
+ assert found : "could not determine class name for file: " + filename;
+ return matcher.group();
+ }
+
+ private String getPackagePart(String javaString, String filename) {
+ Matcher matcher = packageLinePattern.matcher(javaString);
+ boolean found = matcher.find();
+ assert found : "Could not determine package name for file: " + filename;
+ String theMatch = matcher.group();
+ String partial = theMatch.substring("package org.jboss.cache".length());
+ if (partial.trim().length() == 0) return partial.trim();
+ return partial.substring(1);//drop the leading dot.
+ }
+
+
+ private boolean needsUpdate(File file) throws Exception {
+ String javaFileStr = getFileAsString(file);
+ if (javaFileStr.indexOf(" testName = \"") > 0) return false;
+ int atTestIndex = javaFileStr.indexOf("@Test");
+ int classDeclarationIndex = javaFileStr.indexOf("public class");
+ return atTestIndex > 0 && atTestIndex < classDeclarationIndex;
+ }
+
+ private String getFileAsString(File file) throws Exception {
+ StringBuilder builder = new StringBuilder();
+ BufferedReader fileReader = new BufferedReader(new FileReader(file));
+ String line;
+ while ((line = fileReader.readLine()) != null) {
+ builder.append(line + "\n");
+ }
+ this.fileCache = builder.toString();
+// fileReader.close();
+ return fileCache;
+ }
+
+ private File[] getJavaFiles() {
+ File file = new File(dir);
+ assert file.isDirectory();
+ ArrayList<File> result = new ArrayList<File>();
+ addJavaFiles(file, result);
+ return result.toArray(new File[0]);
+ }
+
+ private void addJavaFiles(File file, ArrayList<File> result) {
+ assert file.isDirectory();
+ File[] javaFiles = file.listFiles(javaFilter);
+// printFiles(javaFiles);
+ result.addAll(Arrays.asList(javaFiles));
+ for (File dir : file.listFiles(onlyDirs)) {
+ addJavaFiles(dir, result);
+ }
+ }
+
+ private void printFiles(File[] javaFiles) {
+ for (File f : javaFiles) {
+ System.out.println(f.getAbsolutePath());
+ }
+ }
+
+ public void verifyTestName() throws Exception {
+ File[] javaFiles = getJavaFiles();
+ StringBuilder errorMessage = new StringBuilder("Following test class(es) do
not have an appropriate test name: \n");
+ boolean hasErrors = false;
+ for (File file : javaFiles) {
+ String expectedName = incorrectTestName(file);
+ if (expectedName != null) {
+ errorMessage.append(file.getAbsoluteFile()).append(" expected test name
is: '").append(expectedName).append("' \n");
+ hasErrors = true;
+ }
+ }
+ assert !hasErrors : errorMessage.append("The rules for writting UTs are being
descibed here:
https://www.jboss.org/community/docs/DOC-13315");
+ }
+
+ private String incorrectTestName(File file) throws Exception {
+ String fileAsStr = getFileAsString(file);
+
+ boolean containsTestAnnotation = atAnnotationPattern.matcher(fileAsStr).find();
+ if (!containsTestAnnotation) return null;
+
+ String expectedTestName = getTestName(fileAsStr, file.getName());
+ if (expectedTestName == null) return null; //this happens when the class is
abstract
+ Matcher matcher = this.testNamePattern.matcher(fileAsStr);
+ if (!matcher.find()) return expectedTestName;
+ String name = matcher.group().trim();
+ int firstIndexOfQuote = name.indexOf('"');
+ String existingTestName = name.substring(firstIndexOfQuote + 1, name.length() - 1);
//to ignore last quote
+ if (!existingTestName.equals(expectedTestName)) return expectedTestName;
+ return null;
+ }
+
+
+ @Test(enabled = false)
+ public static void main(String[] args) throws Exception {
+ File file = new
File("C:\\jboss\\coding\\za_trunk\\src\\test\\java\\org\\jboss\\cache\\statetransfer\\ForcedStateTransferTest.java");
+ String incorrectName = new TestNameVerifier().incorrectTestName(file);
+ System.out.println("incorrectName = " + incorrectName);
+
+
+// new TestNameVerifier().process();
+// Pattern classLinePattern = Pattern.compile("@Test[^)]*");
+// String totest = "aaaa\n" + "@Test(groups =
{\"functional\", \"pessimistic\"})\n" + "{ dsadsadsa";
+// Matcher matcher = classLinePattern.matcher(totest);
+// boolean found = matcher.find();
+// System.out.println("found = " + found);
+// String theMatch = matcher.group();
+// String result = matcher.replaceFirst(theMatch + ",
testName=\"alaBala\"");
+// System.out.println("theMatch = " + theMatch);
+// System.out.println("result = " + result);
+
+ }
+}
\ No newline at end of file
Property changes on: core/trunk/src/test/java/org/jboss/cache/TestNameVerifier.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationRejoinTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationRejoinTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationRejoinTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -25,7 +25,7 @@
*
* @author Fredrik Johansson, Cubeia Ltd
*/
-@Test(groups = "functional", testName =
"buddyreplication.BuddyReplicationTestsBase")
+@Test(groups = "functional", testName =
"buddyreplication.BuddyReplicationRejoinTest")
public class BuddyReplicationRejoinTest extends BuddyReplicationTestsBase
{
private static Log log = LogFactory.getLog(BuddyReplicationRejoinTest.class);
Modified:
core/trunk/src/test/java/org/jboss/cache/buddyreplication/mvcc/Buddy3NodesWithPoolNoDataGravitationTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/buddyreplication/mvcc/Buddy3NodesWithPoolNoDataGravitationTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/buddyreplication/mvcc/Buddy3NodesWithPoolNoDataGravitationTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -1,13 +1,12 @@
package org.jboss.cache.buddyreplication.mvcc;
-import org.testng.annotations.Test;
-import org.jboss.cache.buddyreplication.BuddyReplicationTestsBase;
import org.jboss.cache.config.Configuration;
+import org.testng.annotations.Test;
/**
* @author Mircea.Markus(a)jboss.com
*/
-@Test(groups = "functional", testName =
"mvcc.buddyreplication.Buddy3NodesWithPoolNoDataGravitationTest")
+@Test(groups = "functional", testName =
"buddyreplication.mvcc.Buddy3NodesWithPoolNoDataGravitationTest")
public class Buddy3NodesWithPoolNoDataGravitationTest extends
org.jboss.cache.buddyreplication.Buddy3NodesWithPoolNoDataGravitationTest
{
@Override
Modified:
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/MoveCommandTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/MoveCommandTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/MoveCommandTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -18,7 +18,7 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-@Test(groups = "unit", sequential = true)
+@Test(groups = "unit", testName =
"commands.legacy.write.MoveCommandTest")
public class MoveCommandTest extends AbstractDataCommandTest
{
MoveCommand command;
Modified:
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/PutDataMapCommandTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/PutDataMapCommandTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/PutDataMapCommandTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -23,7 +23,7 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-@Test(groups = "unit", sequential = true)
+@Test(groups = "unit", testName =
"commands.legacy.write.PutDataMapCommandTest")
public class PutDataMapCommandTest extends TestContextBase
{
Fqn testFqn = Fqn.fromString("/testfqn");
Modified:
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/VersionedInvalidateCommandTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/VersionedInvalidateCommandTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/commands/legacy/write/VersionedInvalidateCommandTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -23,7 +23,7 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-@Test(groups = "unit", sequential = true)
+@Test(groups = "unit", testName =
"commands.legacy.write.VersionedInvalidateCommandTest")
public class VersionedInvalidateCommandTest extends AbstractDataCommandTest
{
DataVersion dataVersion;
Modified:
core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -23,7 +23,7 @@
* @author Mircea.Markus(a)jboss.com
* @since 3.0
*/
-@Test(groups = "unit")
+@Test(groups = "unit", testName =
"config.ConfigurationTransformerTest")
public class ConfigurationTransformerTest
{
public static final String XSLT_FILE = "config2to3.xslt";
Modified:
core/trunk/src/test/java/org/jboss/cache/config/parsing/CustomInterceptorsElementParserTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/config/parsing/CustomInterceptorsElementParserTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/config/parsing/CustomInterceptorsElementParserTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -37,7 +37,7 @@
* @author Mircea.Markus(a)jboss.com
* @since 3.0
*/
-@Test (groups = "unit")
+@Test (groups = "unit", testName =
"config.parsing.CustomInterceptorsElementParserTest")
public class CustomInterceptorsElementParserTest
{
CustomInterceptorsElementParser parser = new CustomInterceptorsElementParser();
Modified: core/trunk/src/test/java/org/jboss/cache/jmx/JmxManualTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/jmx/JmxManualTest.java 2009-02-13 19:07:47
UTC (rev 7695)
+++ core/trunk/src/test/java/org/jboss/cache/jmx/JmxManualTest.java 2009-02-16 14:25:32
UTC (rev 7696)
@@ -15,7 +15,7 @@
// do NOT enable this test in SVN as it will cause Hudson (or any other continuous
integration test harness) to get
// stuck.
-@Test(groups = "maual", enabled = false)
+@Test(groups = "maual", enabled = false, testName =
"jmx.JmxManualTest")
public class JmxManualTest
{
public void testLocal() throws IOException
Modified:
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/CacheJmxWrapperTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/CacheJmxWrapperTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/CacheJmxWrapperTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -31,7 +31,7 @@
* @author <a href="mailto:manik AT jboss DOT org">Manik
Surtani</a>
* @author Brian Stansberry
*/
-@Test(groups = "functional", testName =
"jmx.deprecated.CacheJmxWrapperTestBase")
+@Test(groups = "functional", testName =
"jmx.deprecated.CacheJmxWrapperTest")
public class CacheJmxWrapperTest extends CacheJmxWrapperTestBase
{
public void testCacheMBeanBinding() throws Exception
Modified:
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/InterceptorRegistrationTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/InterceptorRegistrationTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/InterceptorRegistrationTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -34,7 +34,7 @@
* @author <a href="brian.stansberry(a)jboss.com">Brian
Stansberry</a>
* @version $Revision$
*/
-@Test(groups = "functional", testName =
"jmx.deprecated.CacheJmxWrapperTestBase")
+@Test(groups = "functional", testName =
"jmx.deprecated.InterceptorRegistrationTest")
public class InterceptorRegistrationTest extends CacheJmxWrapperTestBase
{
Modified:
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LegacyConfigurationTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LegacyConfigurationTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LegacyConfigurationTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -70,7 +70,7 @@
* @author <a href="brian.stansberry(a)jboss.com">Brian
Stansberry</a>
* @version $Revision$
*/
-@Test(groups = "functional", testName =
"jmx.deprecated.CacheJmxWrapperTestBase")
+@Test(groups = "functional", testName =
"jmx.deprecated.LegacyConfigurationTest")
public class LegacyConfigurationTest extends CacheJmxWrapperTestBase
{
public void testLocalCache() throws Exception
Modified:
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LifecycleNotificationTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LifecycleNotificationTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LifecycleNotificationTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -40,7 +40,7 @@
* @author <a href="brian.stansberry(a)jboss.com">Brian
Stansberry</a>
* @version $Revision$
*/
-@Test (groups = "functional", testName =
"jmx.deprecated.CacheJmxWrapperTestBase")
+@Test (groups = "functional", testName =
"jmx.deprecated.LifecycleNotificationTest")
public class LifecycleNotificationTest extends CacheJmxWrapperTestBase
{
public void testGetStateAndStateNotification() throws Exception
Modified:
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/OptimisticNotificationTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/OptimisticNotificationTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/OptimisticNotificationTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -12,7 +12,7 @@
/**
* @author <a href="mailto:manik AT jboss DOT org">Manik Surtani (manik
AT jboss DOT org)</a>
*/
-@Test (groups = "functional", testName =
"jmx.deprecated.NotificationTest")
+@Test (groups = "functional", testName =
"jmx.deprecated.OptimisticNotificationTest")
public class OptimisticNotificationTest extends NotificationTest
{
public OptimisticNotificationTest()
Modified:
core/trunk/src/test/java/org/jboss/cache/loader/UnnecessaryLoadingSetDataTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/loader/UnnecessaryLoadingSetDataTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/loader/UnnecessaryLoadingSetDataTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -25,7 +25,7 @@
* @author Elias Ross
* @since 3.0.0
*/
-@Test(groups = {"functional", "mvcc"}, enabled = false, description =
"To do with the setData() method on Cache, which will only be valid in
3.1.0.GA.")
+@Test(groups = {"functional", "mvcc"}, enabled = false, testName =
"loader.UnnecessaryLoadingSetDataTest", description = "To do with the
setData() method on Cache, which will only be valid in 3.1.0.GA.")
public class UnnecessaryLoadingSetDataTest
{
private CacheSPI<Object, Object> cache;
Modified:
core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationOptLocksTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationOptLocksTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationOptLocksTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -7,12 +7,9 @@
package org.jboss.cache.options.cachemodelocal;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.util.TestingUtil;
-import org.jboss.cache.commands.ReplicableCommand;
-import org.jboss.cache.CacheSPI;
import org.testng.annotations.Test;
-@Test (groups = "functional", testName =
"cachemodelocal.AsyncInvalidationOptLocksTest")
+@Test (groups = "functional", testName =
"options.cachemodelocal.AsyncInvalidationOptLocksTest")
public class AsyncInvalidationOptLocksTest extends CacheModeLocalTestBase
{
public AsyncInvalidationOptLocksTest()
Modified: core/trunk/src/test/java/org/jboss/cache/profiling/MockAsyncReplTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/profiling/MockAsyncReplTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++ core/trunk/src/test/java/org/jboss/cache/profiling/MockAsyncReplTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -22,7 +22,7 @@
* @author Manik Surtani (<a href="mailto:manik AT jboss DOT org">manik
AT jboss DOT org</a>)
* @since 3.0
*/
-@Test(groups = "profiling", enabled = false)
+@Test(groups = "profiling", enabled = false,
testName="profiling.MockAsyncReplTest")
public class MockAsyncReplTest extends ProfileTest
{
@Override
Modified: core/trunk/src/test/java/org/jboss/cache/profiling/ProfileMapViewTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/profiling/ProfileMapViewTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++ core/trunk/src/test/java/org/jboss/cache/profiling/ProfileMapViewTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -26,7 +26,7 @@
/**
* Importnat - make sure you inly enable these tests locally!
*/
-@Test(groups = "profiling", enabled = false)
+@Test(groups = "profiling", enabled = false, testName =
"profiling.ProfileMapViewTest")
public class ProfileMapViewTest
{
/*
Modified:
core/trunk/src/test/java/org/jboss/cache/statetransfer/NonBlockingStateTransferTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/statetransfer/NonBlockingStateTransferTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/statetransfer/NonBlockingStateTransferTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -7,14 +7,6 @@
package org.jboss.cache.statetransfer;
-import static org.testng.AssertJUnit.assertEquals;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.util.concurrent.atomic.AtomicReference;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.Cache;
@@ -26,8 +18,14 @@
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestConfigurationFactory;
import org.jboss.cache.util.TestingUtil;
+import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.Test;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+
@Test(groups="functional", testName =
"statetransfer.NonBlockingStateTransferTest")
public class NonBlockingStateTransferTest
{
Modified: core/trunk/src/test/java/org/jboss/cache/transaction/MarkAsRollbackTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/transaction/MarkAsRollbackTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++
core/trunk/src/test/java/org/jboss/cache/transaction/MarkAsRollbackTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -13,7 +13,7 @@
import javax.transaction.RollbackException;
import javax.transaction.TransactionManager;
-@Test(groups = "functional")
+@Test(groups = "functional", testName =
"transaction.MarkAsRollbackTest")
public class MarkAsRollbackTest
{
private static final Fqn fqn = Fqn.fromString("/a/b/c");
Modified: core/trunk/src/test/java/org/jboss/cache/util/FastCopyHashMapTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/FastCopyHashMapTest.java 2009-02-13
19:07:47 UTC (rev 7695)
+++ core/trunk/src/test/java/org/jboss/cache/util/FastCopyHashMapTest.java 2009-02-16
14:25:32 UTC (rev 7696)
@@ -8,7 +8,7 @@
import java.io.ObjectOutputStream;
import java.util.Map;
-@Test(groups = "unit")
+@Test(groups = "unit", testName = "util.FastCopyHashMapTest")
public class FastCopyHashMapTest
{
public void testSerialization() throws Exception