Bug 807465

Summary: REMOVE TEST CODE IN PC
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: Plugin ContainerAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.4CC: hrupp
Target Milestone: ---   
Target Release: RHQ 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-01 09:57:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 782579    

Description John Mazzitelli 2012-03-27 20:53:08 UTC
remove this code before release - from InventoryManager:

            // TODO REMOVE THIS IF STATEMENT - IT IS JUST FOR TESTING
            if (!resource.getChildResources().getClass().getName().contains("Collections$SetFromMap")) {
                new Exception("BAD CHILD SET:" + resource.getChildResources().getClass().getName() + ":"
                    + resource.getId() + ":" + resource.getName()).printStackTrace();
            }

Comment 1 Charles Crouch 2012-03-28 11:48:37 UTC
Setting priority to urgent and adding to sprint tracker, this obviously doesn't need to be done now, but does need addressing prior to the RHQ4.4 release.

Comment 2 John Mazzitelli 2012-03-28 13:49:20 UTC
this was for helping to debug bug #801432

Comment 3 John Mazzitelli 2012-04-11 20:24:21 UTC
rather than remove this, we should wrap it in LOG.isDebugEnabled() or just log it always.

Comment 4 John Mazzitelli 2012-05-01 17:27:54 UTC
rather than remove this, I wrapped it in a isDebugEnabled and logged it at the debug level:

            if (log.isDebugEnabled()) {
                if (!resource.getChildResources().getClass().getName().contains("Collections$SetFromMap")) {
                    Exception e = new Exception(
                        "Unexpected child set - if you see this, please notify support or log it in bugzilla"
                            + resource.getChildResources().getClass().getName() + ":" + resource.getId() + ":"
                            + resource.getName());
                    log.debug("[BZ 801432]", e);
                }
            }

Comment 5 John Mazzitelli 2012-05-01 17:29:40 UTC
git commit to master: ac24e5c 

nothing for QA to test - this is just a code change

Comment 6 Heiko W. Rupp 2013-09-01 09:57:50 UTC
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.