Skip to content

Commit

Permalink
Fixing rest tests using ugly sleep time. Detail #4438
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton committed Jan 22, 2024
1 parent bdacb11 commit 4987e09
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion quickwit/quickwit-control-plane/src/control_plane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub(crate) const CONTROL_PLAN_LOOP_INTERVAL: Duration = if cfg!(any(test, featur
};

/// Minimum period between two rebuild plan operations.
const REBUILD_PLAN_COOLDOWN_PERIOD: Duration = Duration::from_secs(5);
const REBUILD_PLAN_COOLDOWN_PERIOD: Duration = Duration::from_secs(2);

#[derive(Debug)]
struct ControlPlanLoop;
Expand Down
2 changes: 2 additions & 0 deletions quickwit/rest-api-tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def run_step(step, previous_result):
methods = [methods]
for method in methods:
result = run_request_step(method, step, previous_result)
if "sleep_after" in step:
time.sleep(step["sleep_after"])
return result

def load_data(path):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ json:
- rfc3339
fast_precision: seconds
fast: true
sleep_after: 3
---
# Ingest documents
method: POST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ json:
fast:
normalizer: lowercase
record: position
sleep_after: 3
---
# Ingest documents
method: POST
Expand All @@ -43,3 +44,4 @@ params:
refresh: "true"
headers: {"Content-Type": "application/json"}
body_from_file: gharchive-bulk.json.gz
sleep_after: 3
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ json:
- name: login
type: text
fast: true

sleep_after: 6
---
# Ingest documents in index 1
method: POST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ json:
- name: host
type: ip
fast: true
sleep_after: 3
---
# Ingest documents
method: POST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ json:
tokenizer: default
expand_dots: true
fast: true
sleep_after: 3
---
# Ingest documents
method: POST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ json:
dynamic_mapping:
tokenizer: default
fast: true
sleep_after: 3
---
# Ingest documents
method: POST
Expand Down

0 comments on commit 4987e09

Please sign in to comment.