modules/core/plugin-container-itest/src/test/java/org/rhq/core/pc/inventory/AbstractIgnoreTypesInventoryManagerBaseTest.java
| 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 81c5903f3844a3bc5102ed9b21172ed153a6433e
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Jan 29 15:27:42 2014 -0500
Potential fix for intermittent server i-test failure: when waiting for
inventory depth make sure to wait on the inventory manager's view, not
the server-side/fake inv view.
diff --git
a/modules/core/plugin-container-itest/src/test/java/org/rhq/core/pc/inventory/AbstractIgnoreTypesInventoryManagerBaseTest.java
b/modules/core/plugin-container-itest/src/test/java/org/rhq/core/pc/inventory/AbstractIgnoreTypesInventoryManagerBaseTest.java
index cb799de..74a35ad 100644
---
a/modules/core/plugin-container-itest/src/test/java/org/rhq/core/pc/inventory/AbstractIgnoreTypesInventoryManagerBaseTest.java
+++
b/modules/core/plugin-container-itest/src/test/java/org/rhq/core/pc/inventory/AbstractIgnoreTypesInventoryManagerBaseTest.java
@@ -143,25 +143,25 @@ public abstract class AbstractIgnoreTypesInventoryManagerBaseTest
extends Arquil
protected void waitForInventory(int depth) throws Exception {
long start = System.currentTimeMillis();
- int inventoryDepth = getInventoryDepth(platform);
+ int inventoryDepth =
getInventoryDepth(pluginContainer.getInventoryManager().getPlatform(), "");
while (inventoryDepth < depth) {
if (System.currentTimeMillis() - start > 60000L) {
assert false : "Failed to get proper depth, depth is currently
at=" + inventoryDepth;
}
Thread.sleep(1000);
- inventoryDepth = getInventoryDepth(platform);
+ inventoryDepth = getInventoryDepth(platform, "");
}
return;
}
- protected int getInventoryDepth(Resource root) {
- System.out.println("Inventory depth chart: " + root);
+ protected int getInventoryDepth(Resource root, String indent) {
+ System.out.println("Inventory depth chart: " + indent + root);
if (root == null) {
return 0;
}
int maxDepth = 0;
for (Resource c : root.getChildResources()) {
- int childDepth = getInventoryDepth(c);
+ int childDepth = getInventoryDepth(c, " " + indent);
if (maxDepth < childDepth) {
maxDepth = childDepth;
}
Show replies by date