Skip to content

Commit

Permalink
Add small sleep in some tests to reduce flakes in CI (#526)
Browse files Browse the repository at this point in the history
This is to get around a docker-in-ci bug with how the host machine
is not able to sync files to disk properly.

see: #527
  • Loading branch information
allada committed Dec 19, 2023
1 parent a18d2d2 commit fd4e6a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nativelink-worker/tests/local_worker_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ mod local_worker_tests {
drop(file);
precondition_script
};
// TODO(#527) Sleep to reduce flakey chances.
tokio::time::sleep(Duration::from_millis(250)).await;
let local_worker_config = LocalWorkerConfig {
experimental_precondition_script: Some(precondition_script),
..Default::default()
Expand Down
9 changes: 9 additions & 0 deletions nativelink-worker/tests/running_actions_manager_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,9 @@ exit 0
test_wrapper_script
};

// TODO(#527) Sleep to reduce flakey chances.
tokio::time::sleep(Duration::from_millis(250)).await;

let running_actions_manager = Arc::new(RunningActionsManagerImpl::new(RunningActionsManagerArgs {
root_work_directory: root_work_directory.clone(),
execution_configuration: ExecutionConfiguration {
Expand Down Expand Up @@ -1505,6 +1508,9 @@ exit 0
test_wrapper_script
};

// TODO(#527) Sleep to reduce flakey chances.
tokio::time::sleep(Duration::from_millis(250)).await;

let running_actions_manager = Arc::new(RunningActionsManagerImpl::new(RunningActionsManagerArgs {
root_work_directory: root_work_directory.clone(),
execution_configuration: ExecutionConfiguration {
Expand Down Expand Up @@ -1646,6 +1652,9 @@ exit 1
test_wrapper_script
};

// TODO(#527) Sleep to reduce flakey chances.
tokio::time::sleep(Duration::from_millis(250)).await;

let running_actions_manager = Arc::new(RunningActionsManagerImpl::new(RunningActionsManagerArgs {
root_work_directory: root_work_directory.clone(),
execution_configuration: ExecutionConfiguration {
Expand Down

0 comments on commit fd4e6a3

Please sign in to comment.