Skip to content

Commit

Permalink
Fix flakiness of more tests (#759)
Browse files Browse the repository at this point in the history
* Fix full_node_verify_proof_and_store

* Fix ledger commitments test
  • Loading branch information
rakanalh authored Jun 18, 2024
1 parent 196c015 commit 7f96119
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bin/citrea/tests/e2e/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2533,15 +2533,15 @@ async fn full_node_verify_proof_and_store() {
test_client.send_publish_batch_request().await;
test_client.send_publish_batch_request().await;
test_client.send_publish_batch_request().await;
wait_for_l2_block(&full_node_test_client, 4, None).await;

// submits with new da block, triggers commitment submission.
da_service.publish_test_block().await.unwrap();
// This is the above block created.
wait_for_l1_block(&da_service, 3, None).await;
// Commitment submitted
wait_for_l1_block(&da_service, 4, None).await;
// Full node sync commitment block
test_client.send_publish_batch_request().await;
wait_for_l2_block(&full_node_test_client, 5, None).await;

// Full node sync commitment block
test_client.send_publish_batch_request().await;
wait_for_l2_block(&full_node_test_client, 6, None).await;
Expand Down
7 changes: 4 additions & 3 deletions bin/citrea/tests/sequencer_commitments/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,10 @@ async fn test_ledger_get_commitments_on_slot() {
async fn test_ledger_get_commitments_on_slot_prover() {
// citrea::initialize_logging(tracing::Level::INFO);

let db_dir = tempdir_with_children(&["DA", "sequencer", "full-node"]);
let db_dir = tempdir_with_children(&["DA", "sequencer", "prover"]);
let da_db_dir = db_dir.path().join("DA").to_path_buf();
let sequencer_db_dir = db_dir.path().join("sequencer").to_path_buf();
let fullnode_db_dir = db_dir.path().join("full-node").to_path_buf();
let prover_db_dir = db_dir.path().join("prover").to_path_buf();

let (seq_port_tx, seq_port_rx) = tokio::sync::oneshot::channel();

Expand Down Expand Up @@ -437,7 +437,7 @@ async fn test_ledger_get_commitments_on_slot_prover() {
db_config: None,
}),
NodeMode::Prover(seq_port),
fullnode_db_dir,
prover_db_dir,
da_db_dir,
4,
true,
Expand All @@ -459,6 +459,7 @@ async fn test_ledger_get_commitments_on_slot_prover() {
test_client.send_publish_batch_request().await;
test_client.send_publish_batch_request().await;
test_client.send_publish_batch_request().await;
wait_for_l2_block(&test_client, 4, None).await;

da_service.publish_test_block().await.unwrap();
wait_for_l1_block(&da_service, 3, None).await;
Expand Down

0 comments on commit 7f96119

Please sign in to comment.