Skip to content

Commit

Permalink
Fix flaky e2e test (#3143)
Browse files Browse the repository at this point in the history
Fixes flaky e2e test by starting autopilot only once all the orders are
created. Locally, these failures are almost impossible to reproduce
since all the orders, in most cases, belong to a single auction, while
this is not the case on CI.
  • Loading branch information
squadgazzz authored Nov 28, 2024
1 parent 5d6788c commit f53b2d2
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions crates/e2e/tests/e2e/limit_orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,15 +361,6 @@ async fn two_limit_orders_multiple_winners_test(web3: Web3) {
);

let services = Services::new(&onchain).await;
services.start_autopilot(
None,
vec![
"--drivers=solver1|http://localhost:11088/test_solver|10000000000000000,solver2|http://localhost:11088/solver2"
.to_string(),
"--price-estimation-drivers=solver1|http://localhost:11088/test_solver".to_string(),
"--max-winners-per-auction=2".to_string(),
],
).await;
services
.start_api(vec![
"--price-estimation-drivers=solver1|http://localhost:11088/test_solver".to_string(),
Expand Down Expand Up @@ -409,6 +400,17 @@ async fn two_limit_orders_multiple_winners_test(web3: Web3) {
);
let uid_b = services.create_order(&order_b).await.unwrap();

// Start autopilot only once all the orders are created.
services.start_autopilot(
None,
vec![
"--drivers=solver1|http://localhost:11088/test_solver|10000000000000000,solver2|http://localhost:11088/solver2"
.to_string(),
"--price-estimation-drivers=solver1|http://localhost:11088/test_solver".to_string(),
"--max-winners-per-auction=2".to_string(),
],
).await;

// Wait for trade
let indexed_trades = || async {
onchain.mint_block().await;
Expand Down

0 comments on commit f53b2d2

Please sign in to comment.