Skip to content

Commit f769903

Browse files
committed
fix(benchmark): confirm to delete resources
1 parent c4b9a85 commit f769903

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

benchmark/src/ins/create_datasets.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,23 @@ impl super::Instruction for Instruction {
145145
sleep(Duration::from_millis(args.apply_interval_ms)).await;
146146
Ok::<_, Error>(())
147147
})
148+
.await?;
149+
150+
items
151+
.iter()
152+
.map(|x| async move { Ok(x) })
153+
.collect::<FuturesUnordered<_>>()
154+
.try_for_each_concurrent(args.num_threads, |(namespace, name)| async {
155+
let api = Api::<ModelClaimCrd>::namespaced(kube.clone(), namespace);
156+
loop {
157+
let object = api.get_metadata_opt(name).await?;
158+
if object.is_none() {
159+
break;
160+
}
161+
sleep(Duration::from_millis(args.apply_interval_ms)).await;
162+
}
163+
Ok::<_, Error>(())
164+
})
148165
.await
149166
}
150167
}

benchmark/src/ins/create_ponds.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ impl super::Instruction for Instruction {
144144
propagation_policy: Some(PropagationPolicy::Foreground),
145145
..Default::default()
146146
};
147-
148147
namespaces
149148
.iter()
150149
.map(|x| async move { Ok(x) })

0 commit comments

Comments
 (0)