Skip to content

Commit

Permalink
Remove flaky fuel assert for random test case (#400)
Browse files Browse the repository at this point in the history
* Remove flaky fuel assert for random test case

* Add issue URL to comment
  • Loading branch information
jeffcharles committed Jun 19, 2023
1 parent ee303d9 commit 1b98df2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/cli/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@ fn test_error_handling() {
#[test]
fn test_same_module_outputs_different_random_result() {
let mut runner = Runner::new("random.js");
let (output, _, fuel_consumed) = runner.exec(&[]).unwrap();
let (output, _, _) = runner.exec(&[]).unwrap();
let (output2, _, _) = runner.exec(&[]).unwrap();
// In theory these could be equal with a correct implementation but it's very unlikely.
assert!(output != output2);
assert_fuel_consumed_within_threshold(100_543, fuel_consumed);
// Don't check fuel consumed because fuel consumed can be different from run to run. See
// https://github.com/bytecodealliance/javy/issues/401 for investigating the cause.
}

fn run_with_u8s(r: &mut Runner, stdin: u8) -> (u8, String, u64) {
Expand Down

0 comments on commit 1b98df2

Please sign in to comment.