oxidecomputer / omicron

Omicron: Oxide control plane
Mozilla Public License 2.0
244 stars 36 forks source link

Test flake: oxql::ast::grammar::tests::test_now_with_offset #5498

Closed smklein closed 5 months ago

smklein commented 5 months ago

Source: https://buildomat.eng.oxide.computer/wg/0/details/01HV2JTY031HY0XE1K0FD0F401/ZrvK9mBfYaOZAcuaPMQTW3DNm1wfwMqDhq1LBzxqama1wwjQ/01HV2JW4NAQ5EP7AQYSQ8PR83T#S5004 , from https://github.com/oxidecomputer/omicron/runs/23637018265

5004    2024-04-10T00:24:01.065Z            FAIL [   0.174s] oximeter-db oxql::ast::grammar::tests::test_now_with_offset
5005    2024-04-10T00:24:01.065Z    
5006    2024-04-10T00:24:01.065Z    --- STDOUT:              oximeter-db oxql::ast::grammar::tests::test_now_with_offset ---
5007    2024-04-10T00:24:01.066Z    
5008    2024-04-10T00:24:01.066Z    running 1 test
5009    2024-04-10T00:24:01.066Z    test oxql::ast::grammar::tests::test_now_with_offset ... FAILED
5010    2024-04-10T00:24:01.066Z    
5011    2024-04-10T00:24:01.066Z    failures:
5012    2024-04-10T00:24:01.066Z    
5013    2024-04-10T00:24:01.066Z    failures:
5014    2024-04-10T00:24:01.066Z        oxql::ast::grammar::tests::test_now_with_offset
5015    2024-04-10T00:24:01.066Z    
5016    2024-04-10T00:24:01.066Z    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 133 filtered out; finished in 0.13s
5017    2024-04-10T00:24:01.066Z    
5018    2024-04-10T00:24:01.066Z    
5019    2024-04-10T00:24:01.067Z    --- STDERR:              oximeter-db oxql::ast::grammar::tests::test_now_with_offset ---
5020    2024-04-10T00:24:01.067Z    thread 'oxql::ast::grammar::tests::test_now_with_offset' panicked at oximeter/db/src/oxql/ast/grammar.rs:1226:13:
5021    2024-04-10T00:24:01.067Z    Expected `@now() - 5m` to be within 1000us of 2024-04-10 00:23:59.630440756 UTC, but it is 1679us away
5022    2024-04-10T00:24:01.067Z    stack backtrace:
5023    2024-04-10T00:24:01.067Z       0: rust_begin_unwind
5024    2024-04-10T00:24:01.067Z                 at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:647:5
5025    2024-04-10T00:24:01.067Z       1: core::panicking::panic_fmt
5026    2024-04-10T00:24:01.067Z                 at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/panicking.rs:72:14
5027    2024-04-10T00:24:01.067Z       2: check
5028    2024-04-10T00:24:01.067Z                 at ./src/oxql/ast/grammar.rs:1226:13
5029    2024-04-10T00:24:01.068Z       3: oximeter_db::oxql::ast::grammar::tests::test_now_with_offset
5030    2024-04-10T00:24:01.068Z                 at ./src/oxql/ast/grammar.rs:1235:9
5031    2024-04-10T00:24:01.068Z       4: oximeter_db::oxql::ast::grammar::tests::test_now_with_offset::{{closure}}
5032    2024-04-10T00:24:01.068Z                 at ./src/oxql/ast/grammar.rs:1219:30
5033    2024-04-10T00:24:01.068Z       5: core::ops::function::FnOnce::call_once
5034    2024-04-10T00:24:01.068Z                 at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/ops/function.rs:250:5
5035    2024-04-10T00:24:01.068Z       6: core::ops::function::FnOnce::call_once
5036    2024-04-10T00:24:01.068Z                 at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/ops/function.rs:250:5
5037    2024-04-10T00:24:01.068Z    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
smklein commented 5 months ago

FYI @bnaecker

bnaecker commented 5 months ago

I'm ambivalent here, but I think I'm going to remove this test. The behavior it tests is low risk and obvious. It also relies on the speed of the test machine to set its threshold, which is always a bad idea.