diff --git a/gradle.properties b/gradle.properties index 24f41cc141..940953afbe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -30,7 +30,7 @@ issueManagementUrl=https://github.com/apple/servicetalk/issues ciManagementUrl=https://github.com/apple/servicetalk/actions # dependency versions -nettyVersion=4.1.107.Final +nettyVersion=4.1.108.Final nettyIoUringVersion=0.0.25.Final jsr305Version=3.0.2 diff --git a/servicetalk-dns-discovery-netty/src/test/java/io/servicetalk/dns/discovery/netty/DefaultDnsClientTest.java b/servicetalk-dns-discovery-netty/src/test/java/io/servicetalk/dns/discovery/netty/DefaultDnsClientTest.java index 83684e9cd7..9da0d16e78 100644 --- a/servicetalk-dns-discovery-netty/src/test/java/io/servicetalk/dns/discovery/netty/DefaultDnsClientTest.java +++ b/servicetalk-dns-discovery-netty/src/test/java/io/servicetalk/dns/discovery/netty/DefaultDnsClientTest.java @@ -456,10 +456,12 @@ void srvDuplicateAddresses(boolean srvFilterDuplicateEvents) throws Exception { final int targetPort = 9876; final String ip1 = nextIp(); final int ttl = DEFAULT_TTL + 10; + final int ip1Ttl = 2; + final int ip2Ttl = 5; recordStore.addSrv(domain, targetDomain1, targetPort, ttl); - recordStore.addSrv(domain, targetDomain2, targetPort, 1); - recordStore.addIPv4Address(targetDomain1, 1, ip1); - recordStore.addIPv4Address(targetDomain2, 1, ip1); + recordStore.addSrv(domain, targetDomain2, targetPort, ttl); + recordStore.addIPv4Address(targetDomain1, ip1Ttl, ip1); + recordStore.addIPv4Address(targetDomain2, ip2Ttl, ip1); TestPublisherSubscriber> subscriber = dnsSrvQuery(domain); Subscription subscription = subscriber.awaitSubscription(); @@ -468,17 +470,18 @@ void srvDuplicateAddresses(boolean srvFilterDuplicateEvents) throws Exception { assertEvent(subscriber.takeOnNext(), ip1, targetPort, AVAILABLE); if (srvFilterDuplicateEvents) { assertThat(subscriber.pollOnNext(50, MILLISECONDS), is(nullValue())); - recordStore.removeIPv4Address(targetDomain1, 1, ip1); - advanceTime(); + recordStore.removeIPv4Address(targetDomain1, ip1Ttl, ip1); + advanceTime(ip1Ttl); assertThat(subscriber.pollOnNext(50, MILLISECONDS), is(nullValue())); } else { assertEvent(subscriber.takeOnNext(), ip1, targetPort, AVAILABLE); - recordStore.removeIPv4Address(targetDomain1, 1, ip1); - advanceTime(); + recordStore.removeIPv4Address(targetDomain1, ip1Ttl, ip1); + advanceTime(ip1Ttl); assertEvent(subscriber.takeOnNext(), ip1, targetPort, EXPIRED); } - recordStore.removeIPv4Address(targetDomain2, 1, ip1); - advanceTime(); + + recordStore.removeIPv4Address(targetDomain2, ip2Ttl, ip1); + advanceTime(ip2Ttl); assertEvent(subscriber.takeOnNext(), ip1, targetPort, EXPIRED); }