No, this is not the ultimate refactoring For now I'm simply looking to make the tests easier to understand/more robust. Here's roughly what needs to be done:
1. Streamline the class hierarchy of entry points into TestPackagesBasics.groovy, TestPackagesPseudoDistributed.groovy, TestPackagesPseudoDistributedWithRM.groovy
with each next one adding some extra level of testing (and scrutiny and runtime). The difference between TestPackagesPseudoDistributed.groovy and
TestPackagesPseudoDistributedWithRM.groovy is that the later adds an extra step of actually trying to remove the package.
2. Add a state creation/verification class for Hive
3. Implement various hacks and workaround in order to survive our daemon scripts misbehaving (increase timeouts, implement explicit kill -9, etc).
4. Start generating a consumable XML output for content of the packages
5. Implement curl timeouts for HUE