[jbosscache-commits] JBoss Cache SVN: r7642 - in core/trunk/src: test/java/org/jboss/cache/notifications and 1 other directory.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Wed Feb 4 12:00:45 EST 2009
Author: galder.zamarreno at jboss.com
Date: 2009-02-04 12:00:45 -0500 (Wed, 04 Feb 2009)
New Revision: 7642
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
core/trunk/src/test/java/org/jboss/cache/notifications/CacheListenerTest.java
Log:
[JBCACHE-1470] Comment the transaction event notification related tests and the changes in TxInterceptor that caused a bit of havoc.
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2009-02-04 16:28:37 UTC (rev 7641)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2009-02-04 17:00:45 UTC (rev 7642)
@@ -922,9 +922,9 @@
{
// this should ideally be set in beforeCompletion(), after compacting the list.
if (modifications == null) modifications = transactionContext.getModifications();
- Option transactionalOptions = transactionContext.getOption();
- Option originalOptions = ctx.getOptionOverrides();
- transactionalOptions.setSuppressEventNotification(originalOptions.isSuppressEventNotification());
+// Option transactionalOptions = transactionContext.getOption();
+// Option originalOptions = ctx.getOptionOverrides();
+// transactionalOptions.setSuppressEventNotification(originalOptions.isSuppressEventNotification());
ctx.setOptionOverrides(transactionContext.getOption());
}
if (tx != null) transactions.remove(tx);
@@ -1055,7 +1055,7 @@
// set any transaction wide options as current for this thread, caching original options that would then be reset
originalOptions = ctx.getOptionOverrides();
transactionalOptions = transactionContext.getOption();
- transactionalOptions.setSuppressEventNotification(originalOptions.isSuppressEventNotification());
+// transactionalOptions.setSuppressEventNotification(originalOptions.isSuppressEventNotification());
ctx.setOptionOverrides(transactionalOptions);
try
Modified: core/trunk/src/test/java/org/jboss/cache/notifications/CacheListenerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/notifications/CacheListenerTest.java 2009-02-04 16:28:37 UTC (rev 7641)
+++ core/trunk/src/test/java/org/jboss/cache/notifications/CacheListenerTest.java 2009-02-04 17:00:45 UTC (rev 7642)
@@ -70,6 +70,7 @@
@AfterMethod(alwaysRun = true)
public void tearDown() throws Exception
{
+ clearSuppressEventNotification();
Transaction t = tm.getTransaction();
if (t != null)
tm.rollback();
@@ -382,7 +383,7 @@
{
txNonexistentRemove(false);
eventLog.events.clear();
- txNonexistentRemove(true);
+// txNonexistentRemove(true);
}
protected void txNonexistentRemove(boolean supressEventNotification) throws Exception
@@ -412,7 +413,7 @@
{
txCreationCommit(false);
eventLog.events.clear();
- txCreationCommit(true);
+// txCreationCommit(true);
}
protected void txCreationCommit(boolean supressEventNotification) throws Exception
@@ -460,7 +461,7 @@
{
txCreationRollback(false);
eventLog.events.clear();
- txCreationRollback(true);
+// txCreationRollback(true);
}
protected void txCreationRollback(boolean supressEventNotification) throws Exception
@@ -507,7 +508,7 @@
{
txOnlyModification(false);
eventLog.events.clear();
- txOnlyModification(true);
+// txOnlyModification(true);
}
protected void txOnlyModification(boolean supressEventNotification) throws Exception
@@ -562,7 +563,7 @@
{
txOnlyRemoval(false);
eventLog.events.clear();
- txOnlyRemoval(true);
+// txOnlyRemoval(true);
}
protected void txOnlyRemoval(boolean supressEventNotification) throws Exception
@@ -618,7 +619,7 @@
{
txRemoveData(false);
eventLog.events.clear();
- txRemoveData(true);
+// txRemoveData(true);
}
protected void txRemoveData(boolean supressEventNotification) throws Exception
@@ -752,4 +753,11 @@
option.setSuppressEventNotification(true);
cache.getInvocationContext().setOptionOverrides(option);
}
+
+ protected void clearSuppressEventNotification()
+ {
+ Option option = new Option();
+ option.setSuppressEventNotification(false);
+ cache.getInvocationContext().setOptionOverrides(option);
+ }
}
More information about the jbosscache-commits
mailing list