Noticed the typo in matcher, but it was too late :) ☕ If you liked this video and want to support my channel, please consider buying me a coffee. Your contribution helps me create more content like this: 👉 Buy Me a Coffee: www.buymeacoffee.com/andrey.fadeev 👉 Ko-fi: ko-fi.com/andreyfadeev Please also subscribe to my other resources: 👉 Substack: blog.andreyfadeev.com 👉 Telegram: t.me/andreyfadeevchannel I'm truly grateful for your support, and thank you for watching! 🙏
what do you think of passing a CountDownLatch into the implementation and then the test can use that latch to wait for it to complete? would that let you avoid having to set fixed timeouts in test code altogether?
It's not always possible, this is based on real-world scenario: you start a service system that runs kafka consumer and produce some messages and need a way to wait until the processing is finished. A countdownlatch in this case will leak into production code, instead we are waiting for some condition to meet: in our case we have a concept of event markers in DB - so if we publish a message and later see that event marker is processed - that means event handling is done and we can validate assertions
Noticed the typo in matcher, but it was too late :)
☕ If you liked this video and want to support my channel, please consider buying me a coffee. Your contribution helps me create more content like this:
👉 Buy Me a Coffee: www.buymeacoffee.com/andrey.fadeev
👉 Ko-fi: ko-fi.com/andreyfadeev
Please also subscribe to my other resources:
👉 Substack: blog.andreyfadeev.com
👉 Telegram: t.me/andreyfadeevchannel
I'm truly grateful for your support, and thank you for watching! 🙏
Great content! Thank you 😊
Hey Andrey! The new video format was really good. The IDE/text editor with a transparent background showing you coding behind it was so nice.
Cheers! :) Spent a quite a bit of time setting up and editing :)
what do you think of passing a CountDownLatch into the implementation and then the test can use that latch to wait for it to complete? would that let you avoid having to set fixed timeouts in test code altogether?
It's not always possible, this is based on real-world scenario: you start a service system that runs kafka consumer and produce some messages and need a way to wait until the processing is finished. A countdownlatch in this case will leak into production code, instead we are waiting for some condition to meet: in our case we have a concept of event markers in DB - so if we publish a message and later see that event marker is processed - that means event handling is done and we can validate assertions
what editor are you using, it looks amazing, and quite snappy
It is IntelliJ Idea :)
@@andrey.fadeev have you considered using neovim?