You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Germán Blanco (JIRA)" <ji...@apache.org> on 2013/12/13 13:11:06 UTC

[jira] [Updated] (ZOOKEEPER-1837) Fix JMXEnv checks (potential race conditions)

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

Germán Blanco updated ZOOKEEPER-1837:
-------------------------------------

    Attachment: ZOOKEEPER-1837.patch

This change is to:
- only verify that a session is added if the session is not closed
- after a shutdown, if the server is still there, then wait a bit and try to check again.

> Fix JMXEnv checks (potential race conditions)
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1837
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1837
>             Project: ZooKeeper
>          Issue Type: Sub-task
>          Components: tests
>    Affects Versions: 3.4.5, 3.5.0
>         Environment: Windows 8
>            Reporter: Germán Blanco
>            Assignee: Germán Blanco
>             Fix For: 3.4.6, 3.5.0
>
>         Attachments: ZOOKEEPER-1837.patch
>
>
> The following failures in ZooKeeper-3.4-WinVS2008_java and ZooKeeper-trunk-WinVS2008_java require fixing:
> [junit] junit.framework.AssertionFailedError: expected:<0> but was:<1>
>     [junit] 	at junit.framework.Assert.fail(Assert.java:47)
>     [junit] 	at junit.framework.Assert.failNotEquals(Assert.java:283)
>     [junit] 	at junit.framework.Assert.assertEquals(Assert.java:64)
>     [junit] 	at junit.framework.Assert.assertEquals(Assert.java:195)
>     [junit] 	at junit.framework.Assert.assertEquals(Assert.java:201)
>     [junit] 	at org.apache.zookeeper.test.JMXEnv.ensureOnly(JMXEnv.java:138)
>     [junit] 	at org.apache.zookeeper.test.ClientBase.startServer(ClientBase.java:417)
>     [junit] 	at org.apache.zookeeper.test.ZooKeeperQuotaTest.testQuota(ZooKeeperQuotaTest.java:80)
>     [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     [junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     [junit] 	at java.lang.reflect.Method.invoke(Method.java:597)
>     [junit] 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>     [junit] 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>     [junit] 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>     [junit] 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> [junit] junit.framework.AssertionFailedError: expected:<0> but was:<1>
>     [junit] 	at junit.framework.Assert.fail(Assert.java:47)
>     [junit] 	at junit.framework.Assert.failNotEquals(Assert.java:283)
>     [junit] 	at junit.framework.Assert.assertEquals(Assert.java:64)
>     [junit] 	at junit.framework.Assert.assertEquals(Assert.java:195)
>     [junit] 	at junit.framework.Assert.assertEquals(Assert.java:201)
>     [junit] 	at org.apache.zookeeper.test.JMXEnv.ensureOnly(JMXEnv.java:138)
>     [junit] 	at org.apache.zookeeper.test.ClientBase.startServer(ClientBase.java:417)
>     [junit] 	at org.apache.zookeeper.test.ZooKeeperQuotaTest.testQuota(ZooKeeperQuotaTest.java:80)
>     [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     [junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     [junit] 	at java.lang.reflect.Method.invoke(Method.java:597)
>     [junit] 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>     [junit] 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>     [junit] 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>     [junit] 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>     [junit] 	at org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:52)
>     [
> junit.framework.AssertionFailedError: expected [0x142e5f027b50001] expected:<1> but was:<0>
> 	at org.apache.zookeeper.test.JMXEnv.ensureAll(JMXEnv.java:115)
> 	at org.apache.zookeeper.test.ClientBase.createClient(ClientBase.java:197)
> 	at org.apache.zookeeper.test.ClientBase.createClient(ClientBase.java:171)
> 	at org.apache.zookeeper.test.ClientBase.createClient(ClientBase.java:156)
> 	at org.apache.zookeeper.test.ClientBase.createClient(ClientBase.java:149)
> 	at org.apache.zookeeper.ZooKeeperTest.testDeleteRecursive(ZooKeeperTest.java:45)
> 	at org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:52)



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)