You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Matthias Pohl (Jira)" <ji...@apache.org> on 2022/02/23 17:00:00 UTC

[jira] [Created] (FLINK-26341) ZooKeeperTestEnvironment does not allow for repeated test execution

Matthias Pohl created FLINK-26341:
-------------------------------------

             Summary: ZooKeeperTestEnvironment does not allow for repeated test execution
                 Key: FLINK-26341
                 URL: https://issues.apache.org/jira/browse/FLINK-26341
             Project: Flink
          Issue Type: Bug
          Components: Runtime / Coordination
    Affects Versions: 1.14.3, 1.13.6, 1.15.0
            Reporter: Matthias Pohl


{{ZooKeeperTestEnvironment.deleteAll}} fails when rerunning a test due to the client not being started:
{code}
java.lang.IllegalStateException: Client is not started

	at org.apache.flink.shaded.curator5.org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507)
	at org.apache.flink.shaded.curator5.org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139)
	at org.apache.flink.runtime.zookeeper.ZooKeeperTestEnvironment.deleteAll(ZooKeeperTestEnvironment.java:145)
	at org.apache.flink.runtime.checkpoint.ZooKeeperCheckpointIDCounterITCase.cleanUp(ZooKeeperCheckpointIDCounterITCase.java:48)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.apache.flink.util.TestNameProvider$1.evaluate(TestNameProvider.java:45)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:52)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
{code}

This behavior was observed when running various tests:
* {{ZooKeeperCheckpointIDCounterITCase.testShutdownRemovesState}}
* {{ZooKeeperStateHandleStoreTest.testAddAndLock}}
* {{ZooKeeperStateHandleStoreTest.testFailingAddWithPossiblyInconsistentState}}

I'd assume that this applies in any other case as well.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)