-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more integration-test
tests
#118
Comments
arbtest looks like a good candidate for tests with random data. |
Uuuuh, looks nice. |
Hmm, I'm not happy with arbtest. I wasn't able to generate use arbtest::arbtest;
fn main() {
arbtest(|u| {
let x: Vec<Vec<u8>> = u.arbitrary()?;
println!("{x:?}");
Ok(())
})
.budget_ms(1000)
.size_min(100000)
.size_max(100000000);
} produces
Quite disappointing for 1s runtime and 100000 min bytes. Not sure if I'm doing something wrong. |
|
You can see all (!) generated values in my comment. |
My conclusion: arbtest is inherently flawed and we shouldn't use arbitrary for property testing. arbitrary expects that it is used with some kind of feedback loop for its impl<'a, ElementType: Arbitrary<'a>> Iterator for ArbitraryTakeRestIter<'a, ElementType> {
type Item = Result<ElementType>;
fn next(&mut self) -> Option<Result<ElementType>> {
let keep_going = self.u.arbitrary().unwrap_or(false);
if keep_going {
Some(Arbitrary::arbitrary(&mut self.u))
} else {
None
}
}
} If |
We need to write tests using the
integration-test
framework introduced in #114.crtl_relaxed
is true,\n
can be parsed (Change default for crlf_relaxed to false #133)ctrl_relaxed
is false,\n
causes malformed (Change default for crlf_relaxed to false #133)does not panic if functions are called randomlydelegated to tests: Random testing #232For each case we need to consider whether we want to test client, server, or both.
The text was updated successfully, but these errors were encountered: