Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a socket free SlimService. Remove all hassles with port conflicts and network setup #977

Merged
merged 15 commits into from Oct 17, 2016

Conversation

@six42
Copy link
Contributor

@six42 six42 commented Sep 27, 2016

Port number 1 has now a special meaning: Don’t open a socket. Instead communicate via StdIn and StdOut. Nevertheless all output from the SUT is captured, tunneled via StdErr and added to the Execution Log.

This implementation is now the default behavior (= port number 1 is the default)
The change is fully backward compatible by specifying any other port number.

The Slim protocol number has been increased to 0.5

As there is no need to open a socket it now also easier to implement a Slim Server in other programming languages.

The socket functionality is still useful for distributed testing and should be preserved also in the future. Last but not least it is required for backward compatibility.

@amolenaar
Copy link
Collaborator

@amolenaar amolenaar commented Sep 28, 2016

I like it that you can use FitNesse without sockets. This will rule out a whole class of errors. Kudos!

From the PR it was not clear to me how log messages on stdout and stderr mix with the Slim output.

@amolenaar amolenaar added this to the Next Release milestone Sep 28, 2016
this.stdin = System.in;

// bind System.stdout/System.stderr to original stderr
System.setOut(new PrintStream(new LoggingOutputStream(this.stderr, "SOUT"),
Copy link
Contributor Author

@six42 six42 Sep 28, 2016

@amolenaar
This redirects all messages send to stdout to stderr. So stdout is free. SLIM can send results without the SUT mixing in any log messages.
In line 58 in the "accept" method stdout is bound as communication channel for SLIM

public static final String SLIM_SSL = "SLIM_SSL";
public static final int SLIM_SLAVE_PORT = 1;
Copy link
Collaborator

@amolenaar amolenaar Oct 11, 2016

Isn't SLIM_STDOUT_PORT a more descriptive name? It's odd to call it slave, where the child process is referred to as Slim service and Slim server.

@amolenaar
Copy link
Collaborator

@amolenaar amolenaar commented Oct 11, 2016

I am trying to use the SocketFactory to also create the pipe-like socket. Expect a PR soon ;)

amolenaar added a commit to amolenaar/fitnesse that referenced this issue Oct 13, 2016
Adding a socket free SlimService.  Remove all hassles with port conflicts and network setup
@six42
Copy link
Contributor Author

@six42 six42 commented Oct 17, 2016

Thanks. All merged.

amolenaar added a commit to amolenaar/fitnesse that referenced this issue Oct 17, 2016
Adding a socket free SlimService.  Remove all hassles with port conflicts and network setup
@amolenaar amolenaar merged commit 47c4c51 into unclebob:master Oct 17, 2016
@amolenaar
Copy link
Collaborator

@amolenaar amolenaar commented Oct 17, 2016

Awesome. I merged the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants