fixed tests to work with new transactional items
This commit is contained in:
parent
21e7a6f4b8
commit
49f433b012
7 changed files with 24 additions and 22 deletions
|
|
@ -4,11 +4,6 @@
|
|||
<classpathentry kind="src" path="src/test/java"/>
|
||||
<classpathentry kind="lib" path="dist/api-java.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/akka-kernel">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="akka-kernel/target"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="/Users/jboner/src/scala/akka/lib/activation-1.1.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/jboner/src/scala/akka/lib/akka-util-java.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/jboner/src/scala/akka/lib/antlr-3.1.3.jar"/>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,12 @@
|
|||
package se.scalablesolutions.akka.api;
|
||||
|
||||
import se.scalablesolutions.akka.annotation.*;
|
||||
import se.scalablesolutions.akka.kernel.configuration.*;
|
||||
import se.scalablesolutions.akka.kernel.InMemoryState;
|
||||
import se.scalablesolutions.akka.kernel.*;
|
||||
import se.scalablesolutions.akka.kernel.configuration.LifeCycle;
|
||||
import se.scalablesolutions.akka.kernel.configuration.Permanent;
|
||||
import se.scalablesolutions.akka.kernel.configuration.Component;
|
||||
import se.scalablesolutions.akka.kernel.configuration.AllForOne;
|
||||
import se.scalablesolutions.akka.kernel.configuration.RestartStrategy;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.AbstractModule;
|
||||
|
|
@ -101,7 +105,7 @@ interface InMemStateful {
|
|||
|
||||
class InMemStatefulImpl implements InMemStateful {
|
||||
@state
|
||||
private InMemoryState<String, Object> state = new InMemoryState<String, Object>();
|
||||
private TransactionalMap<String, Object> state = new InMemoryTransactionalMap<String, Object>();
|
||||
|
||||
public String getState(String key) {
|
||||
return (String) state.get(key);
|
||||
|
|
@ -152,7 +156,7 @@ interface InMemClasher {
|
|||
|
||||
class InMemClasherImpl implements InMemClasher {
|
||||
@state
|
||||
private InMemoryState<String, Object> state = new InMemoryState<String, Object>();
|
||||
private TransactionalMap<String, Object> state = new InMemoryTransactionalMap<String, Object>();
|
||||
|
||||
public String getState(String key) {
|
||||
return (String) state.get(key);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,12 @@
|
|||
package se.scalablesolutions.akka.api;
|
||||
|
||||
import se.scalablesolutions.akka.annotation.*;
|
||||
import se.scalablesolutions.akka.kernel.configuration.*;
|
||||
import se.scalablesolutions.akka.kernel.InMemoryState;
|
||||
import se.scalablesolutions.akka.kernel.*;
|
||||
import se.scalablesolutions.akka.kernel.configuration.LifeCycle;
|
||||
import se.scalablesolutions.akka.kernel.configuration.Permanent;
|
||||
import se.scalablesolutions.akka.kernel.configuration.Component;
|
||||
import se.scalablesolutions.akka.kernel.configuration.AllForOne;
|
||||
import se.scalablesolutions.akka.kernel.configuration.RestartStrategy;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.AbstractModule;
|
||||
|
|
@ -18,7 +22,7 @@ public class PersistentStateTest extends TestCase {
|
|||
static String messageLog = "";
|
||||
|
||||
final private ActiveObjectGuiceConfigurator conf = new ActiveObjectGuiceConfigurator();
|
||||
|
||||
|
||||
protected void setUp() {
|
||||
conf.configureActiveObjects(
|
||||
new RestartStrategy(new AllForOne(), 3, 5000),
|
||||
|
|
@ -59,8 +63,7 @@ interface PersistentStateful {
|
|||
}
|
||||
|
||||
class PersistentStatefulImpl implements PersistentStateful {
|
||||
@state
|
||||
private InMemoryState<String, Object> state = new InMemoryState<String, Object>();
|
||||
private TransactionalMap state = new CassandraPersistentTransactionalMap(this);
|
||||
|
||||
public String getState(String key) {
|
||||
return (String) state.get(key);
|
||||
|
|
@ -110,8 +113,7 @@ interface PersistentClasher {
|
|||
}
|
||||
|
||||
class PersistentClasherImpl implements PersistentClasher {
|
||||
@state
|
||||
private InMemoryState<String, Object> state = new InMemoryState<String, Object>();
|
||||
private TransactionalMap state = new CassandraPersistentTransactionalMap(this);
|
||||
|
||||
public String getState(String key) {
|
||||
return (String) state.get(key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue