Issue with testing a terminal on Windows with GitHub Actions

15 views
Skip to first unread message

Thomas Segismont

unread,
Nov 5, 2024, 11:23:07 AM11/5/24
to jline-users
Hi,

I am a Vert.x committer and maintainer of the Vert.x Maven Plugin.

We use jline for interactions with users creating a new project (asking questions about the desired version, artifact id, ... etc).

In the test suite, we create a test line reader like this:

Terminal terminal = TerminalBuilder.builder()
  .system(false)
  .jni(false)
  .streams(in, out)
  .build();
console = LineReaderBuilder.builder()
  .terminal(terminal)
  .build();

"in" is a PipedInputStream and "out" a ByteArrayOutputStream.

It worked well on both Linux and Windows until recently, with no changes on our side.

The problem is that, now, on Windows, the surefire plugin prints this:
Error: [SUREFIRE] std/in stream corrupted

And then the build fails even if all tests passed.

I've captured all the details in this bug report: https://github.com/reactiverse/vertx-maven-plugin/issues/644

Does that ring a bell to anyone?

Can you see anything wrong in the way the test Terminal and LineReader are created?

Thank you,
Thomas

Guillaume Nodet

unread,
Nov 8, 2024, 3:28:36 AM11/8/24
to jline...@googlegroups.com
Hi Thomas,

If you're always in the test suite, you may want to force the use of the "exec" provider, which will avoid creating a terminal:
  
Terminal terminal = TerminalBuilder.builder()
.provider(TerminalBuilder.PROP_PROVIDER_EXEC)
.streams(in, out).build();

That may help.  

Guillaume

--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jline-users/74db3719-3c36-45c4-a5b8-6890cda577aan%40googlegroups.com.

Thomas SEGISMONT

unread,
Nov 8, 2024, 5:23:37 AM11/8/24
to jline...@googlegroups.com
This change didn't solve the issue. Unfortunately, I don't have access to a Windows environment for debugging...

Thank you anyway!

Le ven. 8 nov. 2024 à 10:48, Thomas SEGISMONT <tsegi...@gmail.com> a écrit :
Thank you Guillaume, I'll give this a try and keep you informed.

You received this message because you are subscribed to a topic in the Google Groups "jline-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jline-users/Vc8647F8Q00/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jline-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jline-users/CAEQV%2BEFFXRLPCyqKEhAPo%2B8e-JUOvZxhPdE_FeiOmBjCSExC1g%40mail.gmail.com.

Thomas SEGISMONT

unread,
Nov 8, 2024, 5:23:37 AM11/8/24
to jline...@googlegroups.com
Thank you Guillaume, I'll give this a try and keep you informed.

Le ven. 8 nov. 2024 à 09:28, Guillaume Nodet <gno...@gmail.com> a écrit :
You received this message because you are subscribed to a topic in the Google Groups "jline-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jline-users/Vc8647F8Q00/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jline-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jline-users/CAEQV%2BEFFXRLPCyqKEhAPo%2B8e-JUOvZxhPdE_FeiOmBjCSExC1g%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages