How to generate heavy CPU load

Sometimes you need to generate heavy CPU load in your app for testing purposes. if you are using Spring, it will be very convenient to run multi-threaded password hashing: That code is non-blocking, so your program are not going to pause. If you want to pause, you may add the line to the end of […]

READ MORE

Closing resources in Spock Framework

If we have any resource and we need to close it when current spec fails or done (for example, ZooKeeper client), the easiest way is to use the @AutoCleanup annotation with the resource: By default, it calls the close() method, but you can put your own: And optionally use quiet mode, when Spock Framework are going […]

READ MORE