Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
RPC unit test timeout fix (#28998)
Browse files Browse the repository at this point in the history
  • Loading branch information
bw-solana authored Dec 2, 2022
1 parent 0809a4d commit 9cb0151
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rpc/src/rpc_subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,12 @@ pub(crate) mod tests {
encoding: UiAccountEncoding::Binary,
}));

// Sleep here to ensure adequate time for the async thread to fully process the
// subscribed notification before the bank transaction is processed. Without this
// sleep, the bank transaction ocassionally completes first and we hang forever
// waiting to receive a bank notification.
std::thread::sleep(Duration::from_millis(100));

bank_forks
.read()
.unwrap()
Expand Down

0 comments on commit 9cb0151

Please sign in to comment.