You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by bluejoe <bl...@foxmail.com> on 2017/10/14 03:59:48 UTC

creating and starting a NetCat in test cases programmatically

hi, all
I have written a MockNetCat class, which help developers start a netcat programmatically, instead of manually launching
nc -lk 9999
command for test
developers can start a mock NetCat server in test cases and send data to the server (simulating user input text in the nc shell)

is this feature ok to create a PR to flink?

use of MockNetCat is very simple, like:
var nc: MockNetCat = MockNetCat.start(9999);
this starts a NetCat server, and data can be generated using following code:
nc.writeData("hello\r\nworld\r\nbye\r\nworld\r\n");




also i posted a JIRA issue at https://issues.apache.org/jira/browse/FLINK-7827

while got no reply:(