cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sw...@apache.org
Subject [3/3] git commit: updated refs/heads/master to 749b716
Date Mon, 18 Apr 2016 12:31:24 GMT
Merge pull request #1445 from rafaelweingartner/lrg-cs-hackday-025

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>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/749b7160
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/749b7160
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/749b7160

Branch: refs/heads/master
Commit: 749b71601cdbf7b1ee9ea7cdacb8cfc00750d175
Parents: 0dcaf19 c2afa58
Author: Will Stevens <williamstevens@gmail.com>
Authored: Mon Apr 18 08:30:46 2016 -0400
Committer: Will Stevens <williamstevens@gmail.com>
Committed: Mon Apr 18 08:30:46 2016 -0400

----------------------------------------------------------------------
 .../src/main/java/com/cloud/utils/Profiler.java |  7 +-
 .../test/java/com/cloud/utils/TestProfiler.java | 83 +++++++++-----------
 2 files changed, 41 insertions(+), 49 deletions(-)
----------------------------------------------------------------------



Mime
View raw message