Skip to content

Commit

Permalink
Add test simulating customer issue
Browse files Browse the repository at this point in the history
Signed-off-by: Matheus Cruz <[email protected]>
  • Loading branch information
mcruzdev committed Feb 1, 2025
1 parent c27fec6 commit 63f0a52
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion sdk/src/test/java/io/dapr/client/DaprClientHttpTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import java.net.ServerSocket;
import java.net.Socket;
import java.time.Duration;
import java.time.ZonedDateTime;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -345,6 +346,16 @@ public void invokeService() {
assertEquals("hello world", mono.block());
}

@Test
public void invokeServiceWithZonedDateTime() {
mockInterceptor.addRule()
.get("http://" + sidecarIp + ":3000/v1.0/invoke/41/method/neworder")
.respond("\"hello world\"");

Mono<String> mono = daprClientHttp.invokeMethod("41", "neworder", Map.of("zoned", ZonedDateTime.now()), HttpExtension.GET, null, String.class);
assertEquals("hello world", mono.block());
}

@Test
public void invokeServiceNullResponse() {
mockInterceptor.addRule()
Expand Down Expand Up @@ -486,4 +497,4 @@ public String getContentType() {
return "application/xml";
}
}
}
}

0 comments on commit 63f0a52

Please sign in to comment.