Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-26341

ZooKeeperTestEnvironment does not allow for repeated test execution

    XMLWordPrintableJSON

Details

    Description

      ZooKeeperTestEnvironment.deleteAll fails when rerunning a test due to the client not being started:

      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)
      	[...]
      

      This behavior was observed when running various tests with repeat-until-failure enabled in Intellij:

      • ZooKeeperCheckpointIDCounterITCase.testShutdownRemovesState
      • ZooKeeperStateHandleStoreTest.testAddAndLock
      • ZooKeeperStateHandleStoreTest.testFailingAddWithPossiblyInconsistentState

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

      Attachments

        Issue Links

          Activity

            People

              fanrui Rui Fan
              mapohl Matthias Pohl
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: