Skip to content

Commit 7857f39

Browse files
committed
cql_collections it: teardown keyspaces
1 parent 746972d commit 7857f39

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

scylla/tests/integration/types/cql_collections.rs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ async fn test_cql_list() {
9494
&list_cql_value_empty_selected,
9595
)
9696
.await;
97+
98+
session
99+
.ddl(format!("DROP KEYSPACE {}", session.get_keyspace().unwrap()))
100+
.await
101+
.unwrap();
97102
}
98103

99104
#[tokio::test]
@@ -158,6 +163,11 @@ async fn test_cql_set() {
158163
&set_cql_value_empty_selected,
159164
)
160165
.await;
166+
167+
session
168+
.ddl(format!("DROP KEYSPACE {}", session.get_keyspace().unwrap()))
169+
.await
170+
.unwrap();
161171
}
162172

163173
#[tokio::test]
@@ -209,6 +219,11 @@ async fn test_cql_map() {
209219
&map_cql_value_empty_selected,
210220
)
211221
.await;
222+
223+
session
224+
.ddl(format!("DROP KEYSPACE {}", session.get_keyspace().unwrap()))
225+
.await
226+
.unwrap();
212227
}
213228

214229
#[tokio::test]
@@ -232,6 +247,11 @@ async fn test_cql_tuple() {
232247
Some(CqlValue::Text("cql_value_text".to_string())),
233248
]);
234249
insert_and_select(&session, table_name, &tuple_cql_value, &tuple_cql_value).await;
250+
251+
session
252+
.ddl(format!("DROP KEYSPACE {}", session.get_keyspace().unwrap()))
253+
.await
254+
.unwrap();
235255
}
236256

237257
// TODO: Remove this ignore when vector type is supported in ScyllaDB
@@ -269,6 +289,8 @@ async fn test_vector_type_metadata() {
269289
dimensions: 2,
270290
},
271291
);
292+
293+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
272294
}
273295

274296
// TODO: Remove this ignore when vector type is supported in ScyllaDB
@@ -333,6 +355,8 @@ async fn test_vector_type_unprepared() {
333355
vec!["afoo".to_string(), "abar".to_string()]
334356
)
335357
);
358+
359+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
336360
}
337361

338362
// TODO: Remove this ignore when vector type is supported in ScyllaDB
@@ -383,6 +407,8 @@ async fn test_vector_type_prepared() {
383407
vec!["afoo".to_string(), "abar".to_string()]
384408
)
385409
);
410+
411+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
386412
}
387413

388414
async fn test_vector_single_type<
@@ -603,6 +629,8 @@ async fn test_vector_type_all_types() {
603629
vec![vec![vec![1, 2], vec![3, 4]], vec![vec![5, 6], vec![7, 8]]],
604630
)
605631
.await;
632+
633+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
606634
}
607635

608636
/// ScyllaDB does not distinguish empty collections from nulls. That is, INSERTing an empty collection
@@ -666,4 +694,6 @@ async fn test_deserialize_empty_collections() {
666694
)
667695
.await;
668696
assert!(map.is_empty());
697+
698+
session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap();
669699
}

0 commit comments

Comments
 (0)