RFR 8144906: Fix jshell's ToolBasicTest
Robert Field
robert.field at oracle.com
Wed Dec 9 21:10:39 UTC 2015
Jan,
Can you explain how using the same channel assures that the processing of output will be completed before the snippet completes?
Thanks,
Robert
> On Dec 9, 2015, at 7:24 AM, Jan Lahoda <jan.lahoda at oracle.com> wrote:
>
> Hello,
>
> The ToolBasicTest is @ignored now, as it fails on some platforms. I am proposing a partial fix for that, the patch is available here:
> http://cr.openjdk.java.net/~jlahoda/8144906/webrev.00/
>
> Notes:
> -currently, there are three communication channels between the RemoteAgent process and the main JShell process: the command socket and RemoteAgent's out and err. The problem is that it is not easy to synchronize events between these channels, so it may happen that the command is already finished, while the out and err has not been fully processed yet. My proposal here is to change the System.out and System.err so that these also use the socket stream, so that there is (normally) only one communication channel, allowing us to fully process the out/err before finishing a command. This should also fix JDK-8131013. Note I kept the existing code to copy the RemoteAgent's stdout/stderr, just in case the RemoteAgent prints something there (for debugging, for example), even though this shouldn't be typically used.
>
> -unfortunately, there are still some problems on Solaris, which I wasn't able to debug yet, so the test is excluded on Solaris.
>
> -I added synchronization to JDIConnection, which should ensure proper access to the fields, and avoid the need to catch the NPE in JDIConnection.
>
> -ReplToolTesting now converts the platform's line endings to '\n', to eliminate platform specific problems with line endings.
>
> How does this look?
>
> Thanks,
> Jan
More information about the kulla-dev
mailing list