noice. Btw recently I've learnt about random testing and I'm pretty proud of this

https://github.com/pippellia-btc/rely/tree/main/tests

Reply to this note

Please Login to reply.

Discussion

what is it, does it spam the relay with random requests to see if something breaks?

The tests I have aren't random because then its difficult to meaningfully communicate the outcome. Instead it each NIP had a test suite, and then each test in the suite attempts to obtain samples from relays and then uses the uses those samples to construct filters than satisfy the respective test.

I picked the word “conceptually” very carefully 😉

They are conceptually much different 😂

Both useful on different ways. Randomness is great in fuzz testing and finding edge cases that are difficult to find without randomness, the auditor I wrote is better for unit testing known vectors to validate expected behaviors.

And to be clear, they are complimentary and so is relevant. Just wanted to clarify the functionality.

yes. random requests, random events, random filters, random disconnects...

I've found so many weird bugs, like the unregistration queue filling up causing all threads to be blocked

We were using them about 10 years ago. We called them test monkeys, because they just randomly bang on the keyboard.

They never find anything that an intelligent IDE wouldn't find, tho, and they produce a lot of garbage, so we don't use them.

well, I found many race conditions, and one weird bug where many clients unregistering all at once caused the blocking of all threads

Yeah, and it's just fun to build and try out.