Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Non Deterministic test for set value #211

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion contracts/src/main/proto/non_determinism.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ service NonDeterministicService {
rpc CallDifferentMethod(NonDeterministicRequest) returns (google.protobuf.Empty);
rpc BackgroundInvokeWithDifferentTargets(NonDeterministicRequest) returns (google.protobuf.Empty);
rpc SetDifferentKey(NonDeterministicRequest) returns (google.protobuf.Empty);
rpc SetDifferentValue(NonDeterministicRequest) returns (google.protobuf.Empty);
}

message NonDeterministicRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import io.grpc.stub.StreamObserver;
import java.time.Duration;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

public class NonDeterministicService
Expand Down Expand Up @@ -83,14 +82,6 @@ public void setDifferentKey(
incrementCounterAndEnd(request, responseObserver);
}

@Override
public void setDifferentValue(
NonDeterminismProto.NonDeterministicRequest request, StreamObserver<Empty> responseObserver) {
restateContext().set(STATE_A, UUID.randomUUID().toString());
restateContext().sleep(Duration.ofMillis(100));
incrementCounterAndEnd(request, responseObserver);
}

private boolean doLeftAction(NonDeterminismProto.NonDeterministicRequest request) {
return invocationCounts.merge(request.getKey(), 1, Integer::sum) % 2 == 1;
}
Expand Down
Loading