Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
test(sdk-java): pin an explicit empty ids list in a webhook redrive
Yudhi Armyndharisaf49cf19ffb1
diff --git a/sdk/java/src/test/java/com/rmyndharis/openwa/resources/WebhooksResourceTest.java b/sdk/java/src/test/java/com/rmyndharis/openwa/resources/WebhooksResourceTest.javaindex 4e83321ee..83c46c1df 100644--- a/sdk/java/src/test/java/com/rmyndharis/openwa/resources/WebhooksResourceTest.java+++ b/sdk/java/src/test/java/com/rmyndharis/openwa/resources/WebhooksResourceTest.java@@ -53,6 +53,14 @@ class WebhooksResourceTest {assertEquals("{}", tx.lastRequest().body());}+ @Test+ void redriveDeliveryFailuresKeepsAnExplicitEmptyIdsList() {+ // The gateway reads ids: [] as "replay nothing" and an omitted ids as "replay up to 100 rows".+ tx.respond(200, "{\"redriven\":0,\"delivered\":0,\"enqueued\":0,\"failed\":0,\"skipped\":0,\"remaining\":3}");+ client.webhooks.redriveDeliveryFailures(RedriveWebhookDeliveriesRequest.builder().ids(List.of()).build());+ assertEquals("{\"ids\":[]}", tx.lastRequest().body());+ }+@Testvoid listHitsWebhooksRoot() {tx.respond(200, "[]");