Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/409#discussion_r22162381
--- Diff:
software/base/src/test/java/brooklyn/management/usage/ApplicationUsageTrackingTest.java
---
@@ -97,11 +98,12 @@ public void testAddAndRemoveUsageListener() throws
Exception {
String appId = (String) events.get(0).get(1);
String appName = (String) events.get(0).get(2);
String entityType = (String) events.get(0).get(3);
- Map<?,?> metadata = (Map<?, ?>) events.get(0).get(4);
- ApplicationEvent appEvent = (ApplicationEvent)
events.get(0).get(5);
+ Map<?,?> metadata = (Map<?, ?>) events.get(0).get(5);
+ ApplicationEvent appEvent = (ApplicationEvent)
events.get(0).get(6);
assertEquals(appId, app.getId(), "events="+events);
assertNotNull(appName, "events="+events);
+ assertEquals(app.getCatalogItemId(), "testCatalogItem");
--- End diff --
This doesn't look right for the test. Instead of asserting
`app.getCatalogItemId()` has the right value, do you not want to assert about
the value of `String catalogItemId = (String) events.get(0).get(5);
assertEquals(catalogItemId, app.getCatalogItemId())`?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---