Sure, makes sense. However, let's recall that this pull request did not change the timeout value here.
According to the diff, the prior value was 2:
def assert_debug_log(self, expected_msgs, unexpected_msgs=None, timeout=2):
And it is 2 after this pull request.
Feel free to ask claude to submit a pull request, but I don't think the failure is related to the changes here.
it would be better to define a generic failure timeout that is something more like 30 or 60 seconds for operations that are expected to complete quickly
I wouldn't call 30 or 60 seconds quickly. Think about someone writing a test, where each failure takes 60 seconds. So 10 failed iterations will take 10 minutes of useless waiting while writing the test. I think there are two meaningful knobs:
- (1) The "normal" timeout on a "normal" dev machine. This is the literal timeout, it should cover the expected delay on a fast machine plus some overhead. So using 2 here seems fine, just like using 5 or 10. However, using anything more than 10 seem like it is turning the wrong knob, because there is also
- (2) the timeout-factor for slow or overloaded CI machines. This is a factor to scale the normal timeout. E.g. for a raspberry pi you may want to pick a 2x or 4x factor, for a sanitizer build inside qemu you may want to pick 80x or so.
Again, happy to review a pull request, but I don't think this is triggered by the changes here.