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:
Patrik Nordwall 2021-12-20 09:05:40 +01:00 committed by GitHub
parent 3c9ef34280
commit cc446477ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 326 additions and 22 deletions

View file

@ -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 {

View file

@ -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) {