Commit 94ea9d1
Stabilize
Both `say_with_time` regression tests asserted the literal `0.0000s`
elapsed-time string, which holds only when the block finishes within the
`%.4f` half-rounding threshold (~50µs). On rails-nightly Buildkite build
4288 the block took 0.0001s–0.0002s, so the assertions failed on both
the mysql2 and postgresql runs:
```
3) Failure:
MigrationTest#test_migration_say_with_time_with_integer_returning_in_block [test/cases/migration_test.rb:1177]:
expected
actual
@@ -1,4 +1,4 @@
"-- Bar
- -> 0.0000s
+ -> 0.0001s
-> 123 rows
"
4) Failure:
MigrationTest#test_migration_say_with_time_with_non_integer_returning_in_block [test/cases/migration_test.rb:1191]:
expected
actual
@@ -1,3 +1,3 @@
"-- Bar
- -> 0.0000s
+ -> 0.0001s
"
```
- activerecord-mysql2-yjit:
https://buildkite.com/rails/rails-nightly/builds/4288/list?jid=019e420a-5a01-4ecf-97fc-731926c3b2dd&tab=output#L11079
- activerecord-postgresql-yjit:
https://buildkite.com/rails/rails-nightly/builds/4288/list?jid=019e420a-5a02-4c26-a23c-2102d092ccee&tab=output#L11794
Switch to `assert_match` with anchored regexes that pin the format (header
line, subitem indent, 4-decimal `%.4f`, trailing `s`, optional row count,
trailing newlines) while tolerating timing jitter.
Follow up #45705
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>say_with_time regression tests1 parent d18739b commit 94ea9d1
1 file changed
Lines changed: 2 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
| 1177 | + | |
1182 | 1178 | | |
1183 | 1179 | | |
1184 | 1180 | | |
| |||
1188 | 1184 | | |
1189 | 1185 | | |
1190 | 1186 | | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
| 1187 | + | |
1195 | 1188 | | |
1196 | 1189 | | |
1197 | 1190 | | |
| |||
0 commit comments