You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2017/09/17 14:26:01 UTC

[jira] [Resolved] (SPARK-22045) creating and starting a NetCat in test cases programmatically

     [ https://issues.apache.org/jira/browse/SPARK-22045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen resolved SPARK-22045.
-------------------------------
    Resolution: Not A Problem

The test harness doesn't require this. It's just an example. If somehow did really want to use netcat in a real job, they wouldn't want to use a test mock. If this code is useful, it doesn't need to be in Spark.

> creating and starting a NetCat in test cases programmatically
> -------------------------------------------------------------
>
>                 Key: SPARK-22045
>                 URL: https://issues.apache.org/jira/browse/SPARK-22045
>             Project: Spark
>          Issue Type: New Feature
>          Components: Tests
>    Affects Versions: 2.2.0
>            Reporter: bluejoe
>              Labels: netcat
>
> hi, all
> I have written a MockNetCat class, which help developers start a netcat programmatically, instead of manually launching 
> {code:java}
> nc -lk 9999
> {code}
>  command for test
> also I completed a MockNetCatTest class, a JUnit 4 test case which test MockNetCat
> use of MockNetCat is very simple, like:
> {code:java}
> var nc: MockNetCat = MockNetCat.start(9999);
> {code}
> this starts a NetCat server, and data can be generated using following code:
> {code:java}
> nc.writeData("hello\r\nworld\r\nbye\r\nworld\r\n");
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org