Skip to content

Commit fbaebfd

Browse files
committed
OK
1 parent 7078489 commit fbaebfd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

astra-db-java/src/test/java/com/datastax/astra/test/integration/AbstractDatabaseAdminITTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ void shouldCreateNamespaceDefault() throws InterruptedException {
8383

8484
// When
8585
getDatabaseAdmin().createNamespaceAsync("ns2").thenAccept(dan -> assertThat(dan).isNotNull());
86+
while (!getDatabaseAdmin().namespaceExists("ns2")) {
87+
log.warn("Waiting for namespace 'ns2' to be created and db to be active");
88+
Thread.sleep(1000);
89+
}
8690

8791
// Surface
8892
final DatabaseAdmin dbAdmin2 = getDatabaseAdmin();
@@ -98,11 +102,11 @@ void shouldCreateNamespaceDefault() throws InterruptedException {
98102
@Order(5)
99103
void shouldDropNamespace() throws InterruptedException {
100104
assertThat( getDatabaseAdmin().listNamespaceNames())
101-
.as("Check if 'ns2' is present in the namespace names")
105+
.as("Check if 'nsx' is present in the namespace names")
102106
.anyMatch("nsx"::equals);
103107
assertThat( getDatabaseAdmin().namespaceExists("nsx")).isTrue();
104108
Database ns2 = getDatabaseAdmin().getDatabase("nsx");
105-
assertThat("nsx").isNotNull();
109+
assertThat(ns2).isNotNull();
106110
ns2.drop();
107111
while (getDatabaseAdmin().namespaceExists("nsx")) {
108112
log.warn("Waiting for namespace 'nsx' to be delete");

0 commit comments

Comments
 (0)