Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LanguageUtilsTest -- increase the tolerance in the assertions #623

Merged

Conversation

@buildhive
Copy link

Brooklyn Central » brooklyn #318 FAILURE
Looks like there's a problem with this pull request
(what's this?)

@buildhive
Copy link

Brooklyn Central » brooklyn #319 FAILURE
Looks like there's a problem with this pull request
(what's this?)

assertTrue System.currentTimeMillis() > start+50
assertTrue System.currentTimeMillis() < start+500
assertTrue System.currentTimeMillis() > start+10
assertTrue System.currentTimeMillis() < start+200
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has made the tolerance even less: < start+200 is stricter than < start+500. I'd write something like:

    long start = System.currentTimeMillis();
    LanguageUtils.repeatUntilSuccess(period: 1*TimeUnit.MILLISECONDS, timeout: 5000*TimeUnit.MILLISECONDS) { 
        System.currentTimeMillis() > start+50 
    }
    long time = System.currentTimeMillis() - start;
    assertTrue(time >= 50, "time="+time);
    assertTrue(time <= 1000, "time="+time);

@aledsage
Copy link
Member

Will see if buildhive thinks this is good enough to fix the test failure, and then merge.

@buildhive
Copy link

Brooklyn Central » brooklyn #320 FAILURE
Looks like there's a problem with this pull request
(what's this?)

@aledsage
Copy link
Member

The test passed in buildhive, but then failed at:

CliTest.testLaunchCommandParsesArgs:188 LaunchCommand{verbose=false, quiet=false, app=my.App, script=null, location=localhost, port=8081+, noConsole=false, noShutdownOnExit=false, stopOnKeyPress=false} expected [true] but found [false]

So merging.

aledsage added a commit that referenced this pull request Mar 22, 2013
LanguageUtilsTest -- increase the tolerance in the assertions
@aledsage aledsage merged commit 45cfe9a into brooklyncentral:master Mar 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants