add delays in k2v test_items_and_indices

This commit is contained in:
Alex 2022-07-04 12:53:47 +02:00
parent fe3fa83de7
commit aab34bfe54
Signed by untrusted user: lx
GPG key ID: 0E496D15096376BE

View file

@ -1,3 +1,5 @@
use std::time::Duration;
use crate::common; use crate::common;
use assert_json_diff::assert_json_eq; use assert_json_diff::assert_json_eq;
@ -86,6 +88,7 @@ async fn test_items_and_indices() {
assert_eq!(res_body, content); assert_eq!(res_body, content);
// ReadIndex -- now there should be some stuff // ReadIndex -- now there should be some stuff
tokio::time::sleep(Duration::from_secs(1)).await;
let res = ctx let res = ctx
.k2v .k2v
.request .request
@ -154,6 +157,7 @@ async fn test_items_and_indices() {
assert_eq!(res_body, content2); assert_eq!(res_body, content2);
// ReadIndex -- now there should be some stuff // ReadIndex -- now there should be some stuff
tokio::time::sleep(Duration::from_secs(1)).await;
let res = ctx let res = ctx
.k2v .k2v
.request .request
@ -222,6 +226,7 @@ async fn test_items_and_indices() {
); );
// ReadIndex -- now there should be some stuff // ReadIndex -- now there should be some stuff
tokio::time::sleep(Duration::from_secs(1)).await;
let res = ctx let res = ctx
.k2v .k2v
.request .request
@ -290,6 +295,7 @@ async fn test_items_and_indices() {
assert_eq!(res.status(), 204); assert_eq!(res.status(), 204);
// ReadIndex -- now there should be some stuff // ReadIndex -- now there should be some stuff
tokio::time::sleep(Duration::from_secs(1)).await;
let res = ctx let res = ctx
.k2v .k2v
.request .request