Yearly Archives: 2015

When you want to disable a slow running test

A quick one. The code for this is here on GitHub. When testing your software with automated unit tests, you want to be thorough to get code coverage and genuinely cover system behaviour, yet some of the things you want

Tagged with: , ,
Posted in Uncategorized

Multi Module Maven Builds, Code Coverage and Sonar

I love SonarQube for its potential. The reality of it is somewhat different, you need a byzantine series of configurations to make it play nicely with Jenkins, Maven and Jacoco. It gets more difficult when you have a multi module

Posted in Uncategorized

Handy Tips and Tricks For Finding Linux Disk Usage

I’ve no idea how I know that df -h is how you find disk free space… if you want to do more directory based stuff, then this blog is for you: http://www.codecoffee.com/tipsforlinux/articles/22.html I’m glad they wrote it so I don’t

Tagged with:
Posted in Uncategorized

Concurrent Unit Tests

In general, my heart sinks when I think I may have to write some unit tests for threaded code. This can be fiendishly difficult, and the secret with it is not to test things too absolutely, as timings and orders

Tagged with: , ,
Posted in Uncategorized

Signalling between threads in Java

Various releases of Java have introduced more sophisticated concurrency patterns to Java. You don’t need to build your own thread pooling techniques, or queues between threads. However, for a lot of uses, the synchronized keyword is pretty much all you

Tagged with: , ,
Posted in Uncategorized

Mockito Chaining

Dynamic mocks are great. I believe it was Martin Fowler who first switched me onto them. What we should be testing is how an object interacts with its surroundings. Often this means setting it running and verifying that it made

Tagged with: , ,
Posted in Uncategorized

Allow me to assert something

Stories from the code review. You will sometimes find the most innocuous of lines of coding causing some surprises. Consider this assertion: Seems reasonable enough – the thing will fail the assertion if the result is not as expected. A

Tagged with: ,
Posted in Uncategorized