k3po / k3po.js

K3PO for JavaScript (Mocha)
Apache License 2.0
1 stars 3 forks source link

Some grunt tasks don't cause hard failures resulting in Travis builds false positives #8

Open AdrianCozma opened 8 years ago

AdrianCozma commented 8 years ago

Some Travis builds report false success when some of the grunt tasks fail but the return code is still 0.

so far this problem occurred when the k3po:start(build log) and the mochaTest:testMochaK3poSauceBrowserSupport(build log) tasks.

Running "mochaTest:testMochaK3poSauceBrowserSupport" (mochaTest) task
RuntimeError: ERROR The test with session id aa5224f147a341d5a6613fce840dbf60 has already finished, and can't receive further commands
You can learn more at https://saucelabs.com/jobs/aa5224f147a341d5a6613fce840dbf60
For help, please check https://docs.saucelabs.com/reference/troubleshooting-common-error-messages 
    at timeoutsAsyncScript(0) - BrowserRunner.js:27:33
    at init() - BrowserRunner.js:27:26 
The command "grunt sauceTest" exited with 0.
Running "k3po:start" (k3po) task
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-5
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-5
resolving parent: org.kaazing:community:2.15
resolving parent: org.kaazing:community:2.15
resolving parent: org.kaazing:community:2.15
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-5
resolving parent: org.kaazing:community:2.15
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-5
resolving parent: org.kaazing:community:2.15
resolving parent: de.odysseus.juel:juel-parent:2.2.7
resolving parent: de.odysseus.juel:juel-parent:2.2.7
resolving parent: com.fasterxml:oss-parent:4
resolving parent: com.fasterxml:oss-parent:4
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.antlr:antlr4-master:4.2.2
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: com.fasterxml:oss-parent:4
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.antlr:antlr4-master:4.2.2
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
could not resolve maven dependencies [ [Error: Unencoded <
  Line: 372
  Column: 41
  Char: ] ]
The command "grunt sauceTest" exited with 0.
AdrianCozma commented 8 years ago

I looked at the the k3po task and it seems that although in grunt-k3po, grunt.fail.fatal('could not resolve maven dependencies' + err); is used for failures, when the task is used in a different project(like k3po.js) the return code is 0, event though the grunt command is terminated.

console output when running as a k3po.js task:

Running "k3po:start" (k3po) task
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-21
resolving parent: org.kaazing:community:2.18
resolving parent: org.kaazing:community.parent:2.18
resolving parent: org.kaazing:community:2.18
resolving parent: org.kaazing:community.parent:2.18
resolving parent: org.kaazing:community.parent:2.18
resolving parent: org.kaazing:community.parent:2.18
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-21
resolving parent: org.kaazing:community:2.18
resolving parent: org.kaazing:community.parent:2.18
resolving parent: org.antlr:antlr4-master:4.2.2
resolving parent: de.odysseus.juel:juel-parent:2.2.7
resolving parent: de.odysseus.juel:juel-parent:2.2.7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.antlr:antlr4-master:4.2.2
resolving parent: org.sonatype.oss:oss-parent:7
could not resolve maven dependencies [ [Error: download failed for http://central.maven.org/maven2/org/kaazing/k3psao.driver/3.0.0-alpha-21/k3psao.driver-3.0.0-alpha-21.pom (package.json) [status: 404]] ]
icozma@icozma-VirtualBox:~/work/k3po.js.adrian$ echo $?
0

console output when run as a grunt-k3po task:

Running "k3po:daemon" (k3po) task
Verifying property k3po.daemon exists in config...OK
File: [no files]
Options: daemon=false, uri="tcp://localhost:11642", verbose=false, scripts="test/scripts", goal="start"
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-1
resolving parent: org.kaazing:community:2.15
resolving parent: org.kaazing:community:2.15
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-1
resolving parent: org.kaazing:community:2.15
resolving parent: org.antlr:antlr4-master:4.2.2
resolving parent: de.odysseus.juel:juel-parent:2.2.7
resolving parent: de.odysseus.juel:juel-parent:2.2.7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.antlr:antlr4-master:4.2.2
resolving parent: org.sonatype.oss:oss-parent:7
Fatal error: could not resolve maven dependenciesError: download failed for http://central.maven.org/maven2/org/kaazing/k3poasd.driver/3.0.0-alpha-1/k3poasd.driver-3.0.0-alpha-1.pom (package.json) [status: 404]
icozma@icozma-VirtualBox:~/work/grunt-k3po$ echo $?
1

Notice the different command return codes.

@dpwspoon any advice on how to deal with this problem?

dpwspoon commented 8 years ago

I'm not sure, we will have to dig into grunt on why it isn't returning. There seems to be some other people hitting similar things due to keep alive flags... not sure what that means