Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iota-benchmark/tests): fix test_simulated_load_reconfig_restarts #3853

Merged
7 changes: 4 additions & 3 deletions crates/iota-e2e-tests/tests/shared_objects_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ use rand::distributions::Distribution;
use test_cluster::TestClusterBuilder;
use tokio::time::sleep;

// Permitted timestamp tolerance for calculating potential time delay
const TIMESTAMP_TOLERANCE_MS: u64 = 500;
DaughterOfMars marked this conversation as resolved.
Show resolved Hide resolved

/// Send a simple shared object transaction to Iota and ensures the client gets
/// back a response.
#[sim_test]
Expand Down Expand Up @@ -470,8 +473,6 @@ async fn call_shared_object_contract() {

#[sim_test]
async fn access_clock_object_test() {
// Permitted timestamp tolerance for calculating potential time delay
let timestamp_tolerance_ms: u64 = 500;
let test_cluster = TestClusterBuilder::new().build().await;
let package_id = publish_basics_package(&test_cluster.wallet).await.0;

Expand Down Expand Up @@ -540,7 +541,7 @@ async fn access_clock_object_test() {
// should match timestamp of the checkpoint where transaction is included
assert!(
(checkpoint.timestamp_ms as i64 - event.timestamp_ms as i64).abs()
<= timestamp_tolerance_ms as i64,
<= TIMESTAMP_TOLERANCE_MS as i64,
"timestamps are not within the allowed tolerance. Checkpoint: {}, Event: {}",
checkpoint.timestamp_ms,
event.timestamp_ms
Expand Down
Loading