RFR: 8304885: Reuse stale data to improve DNS resolver resiliency [v12]

Daniel Fuchs dfuchs at openjdk.org
Thu Jun 1 18:16:11 UTC 2023


On Tue, 30 May 2023 16:00:28 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Sergey Bylokhov has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Apply suggestions from code review
>>    
>>    Co-authored-by: Daniel Fuchs <67001856+dfuch at users.noreply.github.com>
>>  - Apply suggestions from code review
>>    
>>    Co-authored-by: Daniel Fuchs <67001856+dfuch at users.noreply.github.com>
>
> patch and the CSR are updated as requested.

@mrserb I'm seeing the new test failing intermittently on at least 3 different platforms when run in our CI.

Here is a failure log example (this one is on macOS):


----------System.out:(1/84)----------
The following provider will be used by current test:impl.SimpleResolverProviderImpl
----------System.err:(22/1638)----------
Jun 01, 2023 2:37:32 PM testlib.ResolutionRegistry <init>
INFO: Creating ResolutionRegistry instance from file:/System/Volumes/Data/mesos/work_dir/jib-master/install/2023-06-01-1120469.daniel.fuchs.jdk-dev-git/src.full/open/test/jdk/java/net/spi/InetAddressResolverProvider/addresses.txt
Jun 01, 2023 2:37:32 PM testlib.ResolutionRegistry parseDataFile
INFO: Constructed addresses registry:
	javaTest.org: /1.2.3.4 /ca:fe:ba:be:0:0:0:1 

Jun 01, 2023 2:37:32 PM impl.SimpleResolverProviderImpl$1 lookupByName
INFO: Looking-up addresses for 'javaTest.org'. Lookup characteristics:111
Jun 01, 2023 2:37:32 PM testlib.ResolutionRegistry lookupHost
INFO: Looking-up 'javaTest.org' address
Jun 01, 2023 2:37:37 PM impl.SimpleResolverProviderImpl$1 lookupByName
INFO: Looking-up addresses for 'javaTest.org'. Lookup characteristics:111
java.lang.AssertionError: Only one positive lookup is expected with caching enabled expected [1051960105228] but found [1046805905970]
	at org.testng.Assert.fail(Assert.java:99)
	at org.testng.Assert.failNotEquals(Assert.java:1037)
	at org.testng.Assert.assertEqualsImpl(Assert.java:140)
	at org.testng.Assert.assertEquals(Assert.java:122)
	at org.testng.Assert.assertEquals(Assert.java:797)
	at AddressesStaleCachingTest.doLookup(AddressesStaleCachingTest.java:137)
	at AddressesStaleCachingTest.lambda$testOnlyOneThreadIsBlockedDuringRefresh$0(AddressesStaleCachingTest.java:108)
	at java.base/java.lang.Thread.run(Thread.java:1583)
STATUS:Failed.`main' threw exception: java.lang.AssertionError: Only one positive lookup is expected with caching enabled expected [1051960105228] but found [1046805905970]

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13285#issuecomment-1572559591


More information about the net-dev mailing list