Add slice queries to Persistence TestKit (#30995)
* Add currentEventsBySlices to Persistence TestKit to make it feature comatible with currentEventsByTag, simplifies some usage in downstream projects * Add DurableStateStoreBySliceQuery to Persistence TestKit, to make it feature comatible with the tagged queries simplifies some usage in downstream projects
This commit is contained in:
parent
3c9ef34280
commit
cc446477ee
11 changed files with 326 additions and 22 deletions
|
|
@ -56,7 +56,7 @@ public class PersistenceTestKitPolicySampleTest extends AbstractJavaTest {
|
|||
|
||||
static class SampleEventStoragePolicy implements ProcessingPolicy<JournalOperation> {
|
||||
@Override
|
||||
public ProcessingResult tryProcess(String persistenceId, JournalOperation processingUnit) {
|
||||
public ProcessingResult tryProcess(String processId, JournalOperation processingUnit) {
|
||||
if (processingUnit instanceof WriteEvents) {
|
||||
return StorageFailure.create();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class TestKitExamples {
|
|||
int count = 1;
|
||||
|
||||
@Override
|
||||
public ProcessingResult tryProcess(String persistenceId, JournalOperation processingUnit) {
|
||||
public ProcessingResult tryProcess(String processId, JournalOperation processingUnit) {
|
||||
// check the type of operation and react with success or with reject or with failure.
|
||||
// if you return ProcessingSuccess the operation will be performed, otherwise not.
|
||||
if (count < 10) {
|
||||
|
|
@ -64,7 +64,7 @@ public class TestKitExamples {
|
|||
int count = 1;
|
||||
|
||||
@Override
|
||||
public ProcessingResult tryProcess(String persistenceId, SnapshotOperation processingUnit) {
|
||||
public ProcessingResult tryProcess(String processId, SnapshotOperation processingUnit) {
|
||||
// check the type of operation and react with success or with failure.
|
||||
// if you return ProcessingSuccess the operation will be performed, otherwise not.
|
||||
if (count < 10) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue