Fix random fails of unit tests

Change-Id: I18f2efd7a5a4055ab7ffbc900cc453f578922641
Fixes: bug #1223953
Merge "Fix random fails of unit tests"