[
https://issues.apache.org/jira/browse/HDFS-17830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hualong Zhang updated HDFS-17830:
---------------------------------
Description:
TestZKDelegationTokenSecretManagerImpl tests fail with “Expected state
[STARTED] was [STOPPED]” due to static Curator reuse
{code:java}
IllegalStateException: Expected state [STARTED] was [STOPPED]
at CuratorFrameworkImpl.checkState / usingNamespace
at ZKDelegationTokenSecretManager.<init>(...)
{code}
CI evidence:
[https://ci-hadoop.apache.org/job/hadoop-qbt-trunk-java8-linux-x86_64/2051/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt]
Under JUnit 5’s PER_METHOD lifecycle, static fields persist; this suite shares
a static CuratorFramework that some tests close without resetting, so later
tests reuse a STOPPED client and fail in ZKDelegationTokenSecretManagerImpl
(“Expected [STARTED] was [STOPPED]”). It’s an isolation/cleanup issue, not a
Curator change—reset or recreate the static client between tests (in
@AfterEach).
was:
TestZKDelegationTokenSecretManagerImpl tests fail with “Expected state
[STARTED] was [STOPPED]” due to static Curator reuse
{code:java}
IllegalStateException: Expected state [STARTED] was [STOPPED]
at CuratorFrameworkImpl.checkState / usingNamespace
at ZKDelegationTokenSecretManager.<init>(...)
{code}
CI evidence:
https://ci-hadoop.apache.org/job/hadoop-qbt-trunk-java8-linux-x86_64/2051/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt
> Fix failing TestZKDelegationTokenSecretManagerImpl due to static Curator reuse
> ------------------------------------------------------------------------------
>
> Key: HDFS-17830
> URL: https://issues.apache.org/jira/browse/HDFS-17830
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: rbf
> Affects Versions: 3.5.0
> Reporter: Hualong Zhang
> Assignee: Hualong Zhang
> Priority: Major
>
> TestZKDelegationTokenSecretManagerImpl tests fail with “Expected state
> [STARTED] was [STOPPED]” due to static Curator reuse
> {code:java}
> IllegalStateException: Expected state [STARTED] was [STOPPED]
> at CuratorFrameworkImpl.checkState / usingNamespace
> at ZKDelegationTokenSecretManager.<init>(...)
> {code}
> CI evidence:
> [https://ci-hadoop.apache.org/job/hadoop-qbt-trunk-java8-linux-x86_64/2051/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt]
> Under JUnit 5’s PER_METHOD lifecycle, static fields persist; this suite
> shares a static CuratorFramework that some tests close without resetting, so
> later tests reuse a STOPPED client and fail in
> ZKDelegationTokenSecretManagerImpl (“Expected [STARTED] was [STOPPED]”). It’s
> an isolation/cleanup issue, not a Curator change—reset or recreate the static
> client between tests (in @AfterEach).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]