Skip to content

Commit 746972d

Browse files
committed
unprepared it: teardown keyspaces
1 parent fdcc7ef commit 746972d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

scylla/tests/integration/statements/unprepared.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ async fn test_unprepared_statement() {
114114
watchdog += 1;
115115
}
116116
assert_eq!(results_from_manual_paging, results);
117+
118+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
117119
}
118120

119121
#[tokio::test]
@@ -135,7 +137,7 @@ async fn test_prepare_query_with_values() {
135137

136138
let ks = unique_keyspace_name();
137139
session.ddl(format!("CREATE KEYSPACE IF NOT EXISTS {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 3}}")).await.unwrap();
138-
session.use_keyspace(ks, false).await.unwrap();
140+
session.use_keyspace(&ks, false).await.unwrap();
139141
session
140142
.ddl("CREATE TABLE t (a int primary key)")
141143
.await
@@ -157,6 +159,9 @@ async fn test_prepare_query_with_values() {
157159
_ = tokio::time::sleep(TIMEOUT_PER_REQUEST) => panic!("Rules did not work: no received response"),
158160
};
159161

162+
running_proxy.turn_off_rules();
163+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
164+
160165
running_proxy
161166
}).await;
162167

@@ -186,7 +191,7 @@ async fn test_query_with_no_values() {
186191

187192
let ks = unique_keyspace_name();
188193
session.ddl(format!("CREATE KEYSPACE IF NOT EXISTS {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 3}}")).await.unwrap();
189-
session.use_keyspace(ks, false).await.unwrap();
194+
session.use_keyspace(&ks, false).await.unwrap();
190195
session
191196
.ddl("CREATE TABLE t (a int primary key)")
192197
.await
@@ -208,6 +213,8 @@ async fn test_query_with_no_values() {
208213
_ = tokio::time::sleep(TIMEOUT_PER_REQUEST) => panic!("Rules did not work: no received response"),
209214
};
210215

216+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
217+
211218
running_proxy
212219
}).await;
213220

0 commit comments

Comments
 (0)