Interface PolicyOpsTestKit<P>
-
- All Known Subinterfaces:
CommonTestKitOps<S,P>
,PersistenceTestKitOps<S,P>
- All Known Implementing Classes:
PersistenceTestKit
,SnapshotTestKit
public interface PolicyOpsTestKit<P>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
failNextNOps(int n)
Fail n following journal operations regardless of their type.void
failNextNOps(int n, java.lang.Throwable cause)
Failn
following journal operations regardless of their type.void
failNextNOpsCond(scala.Function2<java.lang.String,P,java.lang.Object> cond, int n)
Failn
following journal operations depending on the conditioncond
.void
failNextNOpsCond(scala.Function2<java.lang.String,P,java.lang.Object> cond, int n, java.lang.Throwable cause)
Failn
following journal operations depending on the conditioncond
.ProcessingPolicy.DefaultPolicies<P>
Policies()
void
resetPolicy()
Returns default policy if it was changed by {@link PolicyOpsTestKit.this.withPolicy()}.PolicyOpsTestKit<P>
withPolicy(ProcessingPolicy<P> policy)
Set new processing policy for journal operations.
-
-
-
Method Detail
-
Policies
ProcessingPolicy.DefaultPolicies<P> Policies()
-
failNextNOps
void failNextNOps(int n)
Fail n following journal operations regardless of their type. Fails operations with defaultExpectedFailure
exception.
-
failNextNOps
void failNextNOps(int n, java.lang.Throwable cause)
Failn
following journal operations regardless of their type. Fails operations with thecause
exception.
-
failNextNOpsCond
void failNextNOpsCond(scala.Function2<java.lang.String,P,java.lang.Object> cond, int n)
Failn
following journal operations depending on the conditioncond
. Failure triggers, whencond
returns true. Fails operations with defaultExpectedFailure
exception.
-
failNextNOpsCond
void failNextNOpsCond(scala.Function2<java.lang.String,P,java.lang.Object> cond, int n, java.lang.Throwable cause)
Failn
following journal operations depending on the conditioncond
. Failure triggers, whencond
returns true. Fails operations with thecause
exception.
-
resetPolicy
void resetPolicy()
Returns default policy if it was changed by {@link PolicyOpsTestKit.this.withPolicy()}.
-
withPolicy
PolicyOpsTestKit<P> withPolicy(ProcessingPolicy<P> policy)
Set new processing policy for journal operations. NOTE! Overrides previously invokedfailNext...
orrejectNext...
-
-