Skip to content

Commit

Permalink
test: reduced fuzz test duration
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Jul 3, 2024
1 parent ad963ea commit 50343e6
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions contracts/sumtree-orderbook/src/tests/e2e/cases/test_fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ fn run_for_duration(
#[test]
fn test_order_fuzz_linear_large_orders_small_range() {
let oper_per_iteration = 1000;
run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_linear(count, (-10, 10), 0.2);
});
}

#[test]
fn test_order_fuzz_linear_small_orders_large_range() {
let oper_per_iteration = 2000;
run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_linear(count, (LARGE_NEGATIVE_TICK, LARGE_POSITIVE_TICK), 0.2);
});
}
Expand All @@ -72,47 +72,47 @@ fn test_order_fuzz_linear_small_orders_large_range() {
#[test]
fn test_order_fuzz_linear_small_orders_small_range() {
let oper_per_iteration = 100;
run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_linear(count, (-10, 0), 0.1);
});
}

#[test]
fn test_order_fuzz_linear_large_cancelled_orders_small_range() {
let oper_per_iteration = 2000;
run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_linear(count, (MIN_TICK, MIN_TICK + 20), 0.8);
});
}

#[test]
fn test_order_fuzz_linear_small_cancelled_orders_large_range() {
let oper_per_iteration = 100;
run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_linear(count, (LARGE_NEGATIVE_TICK, LARGE_POSITIVE_TICK), 0.8);
});
}

#[test]
fn test_order_fuzz_linear_large_all_cancelled_orders_small_range() {
let oper_per_iteration = 2000;
run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_linear(count, (-10, 10), 1.0);
});
}

#[test]
fn test_order_fuzz_linear_single_tick() {
let oper_per_iteration = 1000;
run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_linear(count, (0, 0), 0.2);
});
}

#[test]
fn test_order_fuzz_mixed() {
let oper_per_iteration = 2000;
run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_mixed(count, (-20, 20));
});
}
Expand All @@ -121,7 +121,7 @@ fn test_order_fuzz_mixed() {
fn test_order_fuzz_mixed_single_tick() {
let oper_per_iteration = 2000;

run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_mixed(count, (0, 0));
});
}
Expand All @@ -130,7 +130,7 @@ fn test_order_fuzz_mixed_single_tick() {
fn test_order_fuzz_mixed_large_negative_tick_range() {
let oper_per_iteration = 2000;

run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_mixed(count, (LARGE_NEGATIVE_TICK, LARGE_NEGATIVE_TICK + 10));
});
}
Expand All @@ -139,7 +139,7 @@ fn test_order_fuzz_mixed_large_negative_tick_range() {
fn test_order_fuzz_mixed_large_positive_tick_range() {
let oper_per_iteration = 2000;

run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_mixed(count, (LARGE_POSITIVE_TICK - 10, LARGE_POSITIVE_TICK));
});
}
Expand All @@ -148,7 +148,7 @@ fn test_order_fuzz_mixed_large_positive_tick_range() {
fn test_order_fuzz_mixed_min_tick() {
let oper_per_iteration = 2000;

run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_mixed(count, (MIN_TICK, MIN_TICK + 10));
});
}
Expand All @@ -157,7 +157,7 @@ fn test_order_fuzz_mixed_min_tick() {
fn test_order_fuzz_large_tick_range() {
let oper_per_iteration = 2000;

run_for_duration(60, oper_per_iteration, |count| {
run_for_duration(30, oper_per_iteration, |count| {
run_fuzz_mixed(count, (MIN_TICK, LARGE_POSITIVE_TICK));
});
}
Expand Down

0 comments on commit 50343e6

Please sign in to comment.