Skip to content

Fix RCK view tests failing with AlreadyExistsException due to missing ns1/ns2 in cleanup list#16050

Open
0xMALVEE wants to merge 1 commit intoapache:mainfrom
0xMALVEE:fix-test
Open

Fix RCK view tests failing with AlreadyExistsException due to missing ns1/ns2 in cleanup list#16050
0xMALVEE wants to merge 1 commit intoapache:mainfrom
0xMALVEE:fix-test

Conversation

@0xMALVEE
Copy link
Copy Markdown

Problem

RESTCompatibilityKitViewCatalogTests fails with AlreadyExistsException
on createNamespace when view tests run sequentially. The @BeforeEach
hook calls RCKUtils.purgeCatalogTestEntries to clean up between tests,
but TEST_NAMESPACES only listed ns and newdb.

ViewCatalogTests.listViews() creates ns1 and ns2 namespaces that were
never included in the purge list, so they accumulate across test methods.

Fix

Add ns1 and ns2 to RCKUtils.TEST_NAMESPACES.

Testing

Run RESTCompatibilityKitViewCatalogTests to verify view tests no longer
fail with AlreadyExistsException on createNamespace.


static final List<Namespace> TEST_NAMESPACES = List.of(Namespace.of("ns"), Namespace.of("newdb"));
static final List<Namespace> TEST_NAMESPACES =
List.of(Namespace.of("ns"), Namespace.of("newdb"), Namespace.of("ns1"), Namespace.of("ns2"));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We could also add other_ns namespace created by renameViewUsingDifferentNamespace test.

Copy link
Copy Markdown
Contributor

@huaxingao huaxingao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants