File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
astra-db-java/src/test/java/com/datastax/astra/test/integration Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -101,18 +101,22 @@ void shouldCreateNamespaceDefault() throws InterruptedException {
101
101
@ Test
102
102
@ Order (5 )
103
103
void shouldDropNamespace () throws InterruptedException {
104
- assertThat ( getDatabaseAdmin ().listNamespaceNames ())
104
+ assertThat (getDatabaseAdmin ().listNamespaceNames ())
105
105
.as ("Check if 'nsx' is present in the namespace names" )
106
106
.anyMatch ("nsx" ::equals );
107
107
assertThat ( getDatabaseAdmin ().namespaceExists ("nsx" )).isTrue ();
108
- Database ns2 = getDatabaseAdmin ().getDatabase ("nsx" );
108
+ Database ns2 = getDatabaseAdmin ().getDatabase ("nsx" );
109
109
assertThat (ns2 ).isNotNull ();
110
- ns2 .drop ();
111
- while (getDatabaseAdmin ().namespaceExists ("nsx" )) {
112
- log .warn ("Waiting for namespace 'nsx' to be delete" );
113
- Thread .sleep (1000 );
110
+ try {
111
+ ns2 .drop ();
112
+ while (getDatabaseAdmin ().namespaceExists ("nsx" )) {
113
+ log .warn ("Waiting for namespace 'nsx' to be delete" );
114
+ Thread .sleep (1000 );
115
+ }
116
+ assertThat (getDatabaseAdmin ().namespaceExists ("nsx" )).isFalse ();
117
+ } catch (Exception e ) {
118
+ e .printStackTrace ();
114
119
}
115
- assertThat (getDatabaseAdmin ().namespaceExists ("nsx" )).isFalse ();
116
120
}
117
121
118
122
}
You can’t perform that action at this time.
0 commit comments