[ https://issues.apache.org/jira/browse/LUCENE-6117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-6117: -------------------------------- Attachment: LUCENE-6117.patch Here is a patch. This adds a package private boolean 'enableTestPoints' to IndexWriter. We don't base it on assertion status or any of that, you only want test points if you are one of the few special tests asking for them. I refactored all tests to use the RandomIndexWriter.mockIndexWriter for registering listeners at test points, and this sets the necessary boolean for you on IW. I also added simple tests ensuring that test points are only output when we ask for them. > infostream is currently unusable out of box > ------------------------------------------- > > Key: LUCENE-6117 > URL: https://issues.apache.org/jira/browse/LUCENE-6117 > Project: Lucene - Core > Issue Type: Bug > Reporter: Robert Muir > Attachments: LUCENE-6117.patch > > > testpoints used to only be emitted by assertions (still sketchy), but now are > emitted always. I assume this is due to the change to support running tests > with assertions disabled. > we should try to clean this up, simple stuff like this is now useless: > {code} > indexWriterConfig.setInfoStream(System.out); > // causes massive flooding like this: > // TP 0 [Tue Dec 16 20:19:37 EST 2014; Thread-0]: DocumentsWriterPerThread > addDocument start > // TP 0 [Tue Dec 16 20:19:37 EST 2014; Thread-0]: DocumentsWriterPerThread > addDocument start > // TP 0 [Tue Dec 16 20:19:37 EST 2014; Thread-0]: DocumentsWriterPerThread > addDocument start > {code} > I hit this several times today just trying to do benchmarks and debugging. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org