RFR: 8258057: serviceability/attach/RemovingUnixDomainSocketTest.java doesn't ignore VM warnings [v2]

Patricio Chilano Mateo pchilanomate at openjdk.java.net
Wed Dec 16 23:45:08 UTC 2020


> Hi,
> 
> Please review the following small fix for test RemovingUnixDomainSocketTest.java. As explained in the bug comments, the issue is due to having two different StreamPumper objects consuming from the same stderr, one created by ProcessTools.startProcess() and another by OutputAnalyzer(). In the failing cases the StreamPumper processing thread created in ProcessTools.startProcess() consumes the first part of the deprecation message while the one created in OutputAnalyzer consumes the rest. Since out.getStderr() is not empty and does not contain the string "VM warning:", the test fails.
> 
> I simply replaced the ProcessTools.startProcess() call by a call to start() on the ProcessBuilder object, which doesn't use StreamPumper. I added stderrShouldBeEmptyIgnoreDeprecatedWarnings(), since as mentioned in 8248162 we might not want to hide all warning messages.
> 
> Without the patch I can consistently reproduce the issue. With the patch the test always passes.
> 
> Thanks,
> Patricio

Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:

  include 'VM Warning' in stderr search

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1749/files
  - new: https://git.openjdk.java.net/jdk/pull/1749/files/6e03341b..11184ea6

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1749&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1749&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1749.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1749/head:pull/1749

PR: https://git.openjdk.java.net/jdk/pull/1749


More information about the serviceability-dev mailing list