Skip to content

Commit 224e667

Browse files
committed
prepared it: teardown keyspaces
1 parent db0a5dc commit 224e667

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

scylla/tests/integration/statements/prepared.rs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ async fn test_prepared_statement() {
187187
(17, 16, "I'm prepared!!!", 7, None)
188188
);
189189
}
190+
191+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
190192
}
191193

192194
/// Tests that PreparedStatement inherits the StatementConfig from Statement
@@ -230,7 +232,7 @@ async fn test_prepared_partitioner() {
230232
}
231233

232234
session.ddl(create_ks).await.unwrap();
233-
session.use_keyspace(ks, false).await.unwrap();
235+
session.use_keyspace(&ks, false).await.unwrap();
234236

235237
session
236238
.ddl("CREATE TABLE IF NOT EXISTS t1 (a int primary key)")
@@ -267,6 +269,8 @@ async fn test_prepared_partitioner() {
267269
prepared_statement_for_cdc_log.get_partitioner_name(),
268270
&PartitionerName::CDC
269271
);
272+
273+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
270274
}
271275

272276
#[tokio::test]
@@ -425,6 +429,8 @@ async fn test_token_calculation() {
425429
)
426430
.await;
427431
}
432+
433+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
428434
}
429435

430436
#[tokio::test]
@@ -477,6 +483,8 @@ async fn test_prepared_statement_col_specs() {
477483
spec("c", ColumnType::Native(NativeType::SmallInt)),
478484
];
479485
assert_eq!(result_set_col_specs, expected_result_set_col_specs);
486+
487+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
480488
}
481489

482490
#[tokio::test]
@@ -501,7 +509,7 @@ async fn test_skip_result_metadata() {
501509

502510
let ks = unique_keyspace_name();
503511
session.ddl(format!("CREATE KEYSPACE IF NOT EXISTS {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 3}}")).await.unwrap();
504-
session.use_keyspace(ks, false).await.unwrap();
512+
session.use_keyspace(&ks, false).await.unwrap();
505513
session
506514
.ddl("CREATE TABLE t (a int primary key, b int, c text)")
507515
.await
@@ -556,7 +564,7 @@ async fn test_skip_result_metadata() {
556564
let ks = unique_keyspace_name();
557565

558566
session.ddl(format!("CREATE KEYSPACE IF NOT EXISTS {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 1}}")).await.unwrap();
559-
session.use_keyspace(ks, true).await.unwrap();
567+
session.use_keyspace(&ks, true).await.unwrap();
560568

561569
type RowT = (i32, i32, String);
562570
session
@@ -622,8 +630,12 @@ async fn test_skip_result_metadata() {
622630
}
623631
assert_eq!(results_from_manual_paging, rs);
624632
}
633+
634+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
625635
}
626636

637+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
638+
627639
running_proxy
628640
}).await;
629641

0 commit comments

Comments
 (0)