RFR 8159126 Add test to validate DriverManager.println output when DriverManager is initially loaded
Paul Sandoz
paul.sandoz at oracle.com
Mon Sep 12 17:05:02 UTC 2016
> On 12 Sep 2016, at 09:29, Lance Andersen <lance.andersen at oracle.com> wrote:
>
> Happy Monday,
>
> This RFR is to add a test to validate that the DriverManager.println output is accessible when DriverManager is first loaded.
>
> The webrev can be found at: http://cr.openjdk.java.net/~lancea/8159126/webrev.00/ <http://cr.openjdk.java.net/~lancea/8159126/webrev.00/>
>
>
> Ran JPRT to sanity check across platforms
>
Suggestion:
70 try (BufferedReader reader = new BufferedReader(new CharArrayReader(cw.toCharArray()))) {
71 boolean result
72 = reader.lines().anyMatch(
73 line -> line.matches(".*JDBC DriverManager initialized.*"));
74 assertFalse(result);
Change anyMatch, to noneMatch, and assertTrue (note if the stream is empty none is “vacuously” satisfied and will return true).
Paul.
>
>
> Best
> Lance
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
> Oracle Java Engineering
> 1 Network Drive
> Burlington, MA 01803
> Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
>
>
>
More information about the core-libs-dev
mailing list