From 68896c7bce62ad52977ea47bc7aaf9a354bfc9c4 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Mon, 27 Nov 2023 17:12:23 -0500 Subject: [PATCH] correct custom target notification expectations for 3.0 event emission order --- src/test/java/itest/CustomTargetsTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/test/java/itest/CustomTargetsTest.java b/src/test/java/itest/CustomTargetsTest.java index 95a3db4ca..b7a08d123 100644 --- a/src/test/java/itest/CustomTargetsTest.java +++ b/src/test/java/itest/CustomTargetsTest.java @@ -239,14 +239,13 @@ void shouldBeAbleToDefineTarget() // storedCredential.numMatchingTargets, Matchers.equalTo(Integer.valueOf(1))); JsonObject result2 = resultFuture2.get(); - JsonObject modifiedDiscoveryEvent = result2.getJsonObject("message").getJsonObject("event"); + JsonObject foundDiscoveryEvent = result2.getJsonObject("message").getJsonObject("event"); + MatcherAssert.assertThat(foundDiscoveryEvent.getString("kind"), Matchers.equalTo("FOUND")); MatcherAssert.assertThat( - modifiedDiscoveryEvent.getString("kind"), Matchers.equalTo("FOUND")); - MatcherAssert.assertThat( - modifiedDiscoveryEvent.getJsonObject("serviceRef").getString("connectUrl"), + foundDiscoveryEvent.getJsonObject("serviceRef").getString("connectUrl"), Matchers.equalTo(SELF_JMX_URL)); MatcherAssert.assertThat( - modifiedDiscoveryEvent.getJsonObject("serviceRef").getString("alias"), + foundDiscoveryEvent.getJsonObject("serviceRef").getString("alias"), Matchers.equalTo(alias)); HttpResponse listResponse =