cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexandrelimassantana <...@git.apache.org>
Subject [GitHub] cloudstack pull request: Fixed Profiler's unit tests bugs.
Date Sat, 19 Mar 2016 19:43:28 GMT
GitHub user alexandrelimassantana opened a pull request:

    https://github.com/apache/cloudstack/pull/1445

    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.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rafaelweingartner/cloudstack lrg-cs-hackday-025

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1445.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1445
    
----
commit 8d6370b21fd527dc0046c0a1d67dce35dbf15681
Author: Alexandre Limas Santana <alexandre.limas.santana@gmail.com>
Date:   2016-03-19T19:25:47Z

    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.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message