mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Fixed Profiler's unit tests bugs.### **Problem:** The TestProfiler class was using Java Thread methods to test the Profiler's functionality. That was causing the tests to fail sometimes since the JVM's thread priority could be low on some OS. ### **Fix:** Using PowerMockito to mock the System calls, the threads could be removed. This makes the tests considerably faster, OS independent and still guarantees the correct implementation of the Profiler class. The changes on the Profiler's class was only to shorten the class's line size by not assigning the return value to a variable returning it straight out. * pr/1445: Fixed changes to match code conventions Fixed Profiler's unit tests bugs. Signed-off-by: Will Stevens <williamstevens@gmail.com>