@igreenfield buildhive error looks ligit:
java.lang.AssertionError: expected [true] but found [false]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertTrue(Assert.java:42)
at org.testng.Assert.assertTrue(Assert.java:52)
at
org.jclouds.vsphere.predicates.VSpherePredicateTest.wait_for_vmtoolsTest(VSpherePredicateTest.java:55)
A few things about this test:
* If it were to pass, it would take 100 seconds! These can't be merged into
jclouds-labs or jclouds core as unit tests, because no-one else should have to
wait this long.
* The assertion doesn't include any message, so not much clue about what went
wrong (e.g. sleeps can return a few milliseconds early so can't do such strong
assertions about time).
* Instead of `Assert.assertTrue(!condition)`, it would be much clearer to use
`Assert.assertFalse(condition)`.
For the first point, I suggest you separate out the predicates so there is a
predicate for `HAS_NIC` and `HAS_VMTOOLS`. If you want to test the retry
predicate, then I suggest you make it a method that returns the predicate
(taking as an argument how long to wait), rather than a constant. That would
anyway be much better as hard-coded timeouts often turn out to be inappropriate
for some users.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/61#issuecomment-48483279