Skip to content

Commit 63df305

Browse files
committed
fix(benchmark): wait until the namespaces are wiped
1 parent 0e924ac commit 63df305

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

benchmark/src/ins/create_ponds.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,14 @@ impl super::Instruction for Instruction {
133133
.collect::<FuturesUnordered<_>>()
134134
.try_for_each_concurrent(args.num_threads, |namespace| async {
135135
api.delete(namespace, &dp).await?;
136-
sleep(Duration::from_millis(args.check_interval_ms)).await;
136+
137+
loop {
138+
let object = api.get_metadata_opt(namespace).await?;
139+
if object.is_none() {
140+
break;
141+
}
142+
sleep(Duration::from_millis(args.check_interval_ms)).await;
143+
}
137144
Ok::<_, Error>(())
138145
})
139146
.await

0 commit comments

Comments
 (0)