Bug 831650

Summary: pretty.print gives incomplete output
Product: [JBoss] JBoss Operations Network Reporter: Filip Brychta <fbrychta>
Component: CLIAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: JON 3.1.0CC: hrupp, jshaughn
Target Milestone: ER04   
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Filip Brychta 2012-06-13 14:09:27 UTC
Description of problem:
pretty.print failed to print complete list of resources (just 238 out of 520 resources)

Version-Release number of selected component (if applicable):
3.1.0.GA

How reproducible:
always

Steps to Reproduce:
1.import more than 500 resources
2.execute ./rhq-cli.sh -u rhqadmin -p rhqadmin -f /home/jon/js-files/searchExamples.js > output.txt

content of searchExamples.js:
var criteria = new ResourceCriteria();
criteria.clearPaging();
var resources = ResourceManager.findResourcesByCriteria(criteria);
println("All found resources: [#"+resources.size()+"]");
pretty.print(resources);
  
Actual results:
All found resources: [#520] but number of rows in output.txt was just 243

Expected results:
all found resources are printed

Additional info:
probably related to bug #814579

Comment 1 Jay Shaughnessy 2013-10-15 21:27:53 UTC
I believe this is tied to the issue in bug #814579. 

release/jon3.2.x commit 60dbea341e60c2b95cd5bd278f84b531a7a0c4ac
Author: Jay Shaughnessy <jshaughn>
Date:   Tue Oct 15 17:24:16 2013 -0400

    Very strange issue. Replace out.print("\n") with out.println() calls
    seems to solve the problem.

    cheery-pick master 9eb9b7d8837736f0742eacf2151afb700733a2a9

Comment 2 Jay Shaughnessy 2013-10-16 20:33:58 UTC
Sorry, wrong commit above,

the correct release/jon3.2.x commit: 8a46f3ce8e38b63d765847b0f13f630924d94ac2

Comment 3 Simeon Pinder 2013-10-24 04:09:20 UTC
Moving to ON_QA for testing in the next build.

Comment 4 Filip Brychta 2013-10-30 14:17:21 UTC
Verified on
Version: 3.2.0.ER4
Build Number: e413566:057b211