So I've created two minimal `main` files to run the offending test:
1. 
[RunScriptUsingBasicLogin](https://github.com/devcsrj/bug-reports/blob/master/jclouds-1047/src/main/java/io/devcsrj/report/jclouds/RunScriptUsingBasicLogin.java#L97)
 - attempts to cancel using the default identity+credentials.
2. 
[RunScriptUsingPrivateKey](https://github.com/devcsrj/bug-reports/blob/master/jclouds-1047/src/main/java/io/devcsrj/report/jclouds/RunScriptUsingPrivateKey.java#L97)
 - attempts to cancel after overriding with user `foo`, then using it plus 
private key.

Both files reproduce the issue. BUT
> ..the weirdest part of this last test, is that, sometimes, it passes.

I can now reproduce the *weirdest part*. When debugging any of the two, adding 
a breakpoint to [`ssh.connect()`]( 
https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/callables/SudoAwareInitManager.java#L74),
 then stepping to `return runAction(action);` will succeed, in contrast to the 
[original 
exception](https://gist.github.com/devcsrj/9675b0c3bb04a133fb50/1211b7546f9b17b5d4edaab578092b2b45fb44ac#file-jclouds-profitbricks-live-tests-log-L321).
 Without doing this, the connection would fail. 

I wonder if this has something to do with the delay I present before stepping 
through that, or maybe synchronization issues? Continuing investigation.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/224#issuecomment-165712742

Reply via email to