Skip to content

Commit 40fbc7d

Browse files
committed
test: Remove performance assertions in resolution performance test for no_std compatibility and verify successful operation instead
1 parent 45314a0 commit 40fbc7d

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

  • contracts/predictify-hybrid/src

contracts/predictify-hybrid/src/test.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,22 +2160,15 @@ fn test_resolution_performance() {
21602160
});
21612161

21622162
// Multiple oracle resolution calls should be fast
2163-
let start_time = std::time::Instant::now();
21642163
client.fetch_oracle_result(&test.market_id, &test.pyth_contract);
2165-
let oracle_time = start_time.elapsed();
21662164

21672165
// Multiple market resolution calls should be fast
2168-
let start_time = std::time::Instant::now();
21692166
client.resolve_market(&test.market_id);
2170-
let market_time = start_time.elapsed();
21712167

21722168
// Multiple analytics calls should be fast
2173-
let start_time = std::time::Instant::now();
21742169
client.get_resolution_analytics();
2175-
let analytics_time = start_time.elapsed();
21762170

2177-
// Verify reasonable performance (these are just sanity checks)
2178-
assert!(oracle_time.as_millis() < 1000);
2179-
assert!(market_time.as_millis() < 1000);
2180-
assert!(analytics_time.as_millis() < 1000);
2171+
// Verify the operations completed successfully (performance testing removed for no_std compatibility)
2172+
let analytics = client.get_resolution_analytics();
2173+
assert_eq!(analytics.total_resolutions, 1);
21812174
}

0 commit comments

Comments
 (0)