Fix JENKINS-13229.

What is the point in logging these in unittest? Either assert it was (not) thrown if it matters or simply ignore them.