[ 
https://issues.apache.org/jira/browse/HADOOP-10823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mingliang Liu updated HADOOP-10823:
-----------------------------------
    Attachment: HADOOP-10823.002.patch

Per-offline discussion with [~jnp], we don't have to change the trust store 
file modification time. The 1s sleep interval is good enough to make sure after 
the new store the file has a different modification time from the 1st (initial) 
one.

Basically there are two problems here in the code. 1) The modification time has 
a precision which can be 1 second (os- and jdk-dependent). 2) even after the TS 
file modification time changes, we have to wait the reloader thread to reload 
the contents before asserting newly added records.

Plus, there are three similar places in the test 
{{testReloadCorruptTrustStore}} and {{testReloadMissingTrustStore}} that we 
should address them in this patch. The problem is different in that other two 
test methods should wait for the reloader thread to reload at least once before 
assertion.

Attached v2 patch.

> Intermittent testcase failure: TestReloadingX509TrustManager.testReload
> -----------------------------------------------------------------------
>
>                 Key: HADOOP-10823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10823
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.3.0
>         Environment: java version "1.6.0_31"
> Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
> Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)
> Linux [hostname] 2.6.32-279.14.1.el6.x86_64 #1 SMP Mon Oct 15 13:44:51 EDT 
> 2012 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: Ratandeep Ratti
>            Assignee: Ratandeep Ratti
>              Labels: BB2015-05-TBR
>         Attachments: HADOOP-10823.001.patch, HADOOP-10823.002.patch, 
> HADOOP-10823.patch
>
>
> Pasting the log
> {quote}
> Error Message
> expected:<2> but was:<1>
> Stacktrace
> junit.framework.AssertionFailedError: expected:<2> but was:<1>
>       at junit.framework.Assert.fail(Assert.java:50)
>       at junit.framework.Assert.failNotEquals(Assert.java:287)
>       at junit.framework.Assert.assertEquals(Assert.java:67)
>       at junit.framework.Assert.assertEquals(Assert.java:199)
>       at junit.framework.Assert.assertEquals(Assert.java:205)
>       at 
> org.apache.hadoop.security.ssl.TestReloadingX509TrustManager.testReload(TestReloadingX509TrustManager.java:112)
> Standard Output
> 2014-07-06 06:12:21,170 WARN  ssl.ReloadingX509TrustManager 
> (ReloadingX509TrustManager.java:run(197)) - Could not load truststore (keep 
> using existing one) : java.io.EOFException
> java.io.EOFException
>       at java.io.DataInputStream.readInt(DataInputStream.java:375)
>       at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:628)
>       at 
> sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)
>       at java.security.KeyStore.load(KeyStore.java:1185)
>       at 
> org.apache.hadoop.security.ssl.ReloadingX509TrustManager.loadTrustManager(ReloadingX509TrustManager.java:166)
>       at 
> org.apache.hadoop.security.ssl.ReloadingX509TrustManager.run(ReloadingX509TrustManager.java:195)
>       at java.lang.Thread.run(Thread.java:662)
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to