Set transaction group interval to ZERO by default in tests
We were seeing non-deterministic behavior in randomized tests when generating backtraces took enough time to cause transactions to group in some cases, but not group in others. Tests will need to explicitly opt into grouping if they want it by setting the interval explicitly. We have tests in the text module that currently test the history grouping explicitly, but I'm not sure it's needed elsewhere.
This commit is contained in:
@@ -851,7 +851,6 @@ impl Client {
|
||||
})
|
||||
.detach();
|
||||
|
||||
let t0 = Instant::now();
|
||||
let this = self.clone();
|
||||
let cx = cx.clone();
|
||||
cx.foreground()
|
||||
@@ -868,12 +867,7 @@ impl Client {
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
// TODO - remove. Make the test's non-determinism more apparent by
|
||||
// only sometimes formatting this stack trace.
|
||||
if Instant::now().duration_since(t0).as_nanos() % 2 == 0 {
|
||||
log::error!("connection error: {:?}", err);
|
||||
}
|
||||
|
||||
log::error!("connection error: {:?}", err);
|
||||
this.set_status(Status::ConnectionLost, &cx);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user