It’s time to move to a new blog site

I decided to create a new blog site: https://gualtierotesta.github.io

As you can see this site is hosted by GitHub.github

New posts will be added to the new site so I suggest you to bookmark the new site.

Old posts will remain here but, if they need to be updated, I will post the updated version on the new site and just add a link to the new one in the old one.

Why I decided to move the blog?

Main reasons:

  1. I use GitHub also for my projects so I can remain on the same site when I blog about coding and projects.
  2. GitHub blogging is based on git so I have full control over my post contents.
  3. GitHub is ad-free

See you on GitHub.

Advertisements

Review: Mastering Unit Testing Using Mockito and Junit

Mastering Unit Testing Using Mockito and Junit
Mastering Unit Testing Using Mockito and Junit by Sujoy Acharya
My rating: 4 of 5 stars

Good reading. A complete picture on unit testing across applications layers and frameworks.

The author covers all topics related to unit testing Java based applications using jUnit at several application layers (data, business, web), starting from project setup (using Eclipse, ant, maven, gradle and even jenkins) and ending to tests creation best practices.

Even test beginners can benefit for this book because all explanations are clear and complete.

First four chapters explore unit testing concepts by means of jUnit and Mockito libraries.

Chapter five is dedicated to code coverage using both Eclipse plugins and command line tools (via ant, maven and gradle)

There is also a chapter (#6) dedicated to static code analysys with FindBus, PMD and SonrQube.

Remaining chapters are on web (#7) and data (#8) layers testing, on legacy code testing issues (#9) and, finally, on test best practices (#10).

View all my reviews

JVM issue: concurrency is affected by changing the date of the system!

It can't rain forever...

Executive summary
The implementation of the concurrency primitive LockSupport.parkNanos(), the function that controls *every* concurrency primitive on the JVM, is flawed, and any NTP sync, or system time change backwards, can potentially break it with unexpected results across the board when running a 64bit JVM on Linux 64bit

What we need to do?
This is an old issue, and the bug was declared private. I somehow managed to have the bug reopened to the public, but it’s still a P4, that means that probably won’t be fixed. I think we need to push for a resolution ASAP, be sure that’s in for JDK9, make all the possible effort to make this fix for JDK8 or, at least, to include it in a later patch release. In an ideal world it would be nice to have a patch for JDK7

Why all this urgency?
If a system time change happens then…

View original post 457 more words