Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ public void init() throws Exception {
DaprApiProtocol.GRPC, // appProtocol
60000);
daprRun.switchToGRPC();
daprRun.waitForAppHealth(20000);
daprRun.waitForAppHealth(40000);
}

@Test
public void testInvoke() throws Exception {
try (DaprClient client = new DaprClientBuilder().build()) {
client.waitForSidecar(10000).block();
daprRun.waitForAppHealth(10000);

for (int i = 0; i < NUM_MESSAGES; i++) {
String message = String.format("This is message #%d", i);

Expand Down Expand Up @@ -95,6 +97,8 @@ public void testInvoke() throws Exception {
public void testInvokeTimeout() throws Exception {
try (DaprClient client = new DaprClientBuilder().build()) {
client.waitForSidecar(10000).block();
daprRun.waitForAppHealth(10000);

long started = System.currentTimeMillis();
SleepRequest req = SleepRequest.newBuilder().setSeconds(1).build();
String message = assertThrows(IllegalStateException.class, () ->
Expand All @@ -110,6 +114,8 @@ public void testInvokeTimeout() throws Exception {
public void testInvokeException() throws Exception {
try (DaprClient client = new DaprClientBuilder().build()) {
client.waitForSidecar(10000).block();
daprRun.waitForAppHealth(10000);

SleepRequest req = SleepRequest.newBuilder().setSeconds(-9).build();
DaprException exception = assertThrows(DaprException.class, () ->
client.invokeMethod(daprRun.getAppName(), "sleep", req.toByteArray(), HttpExtension.POST).block());
Expand Down