> On Nov. 25, 2014, 7:06 p.m., Niklas Nielsen wrote: > > 3rdparty/libprocess/src/tests/socket_tests.cpp, lines 94-100 > > <https://reviews.apache.org/r/28415/diff/1/?file=774765#file774765line94> > > > > Can you use the Socket.connect() call? If not, why?
In order to build up confidence in the API, I wanted to test accept bind, listen, accept without assuming connect to be correct yet. Later on we test connect and then use it from there on out. > On Nov. 25, 2014, 7:06 p.m., Niklas Nielsen wrote: > > 3rdparty/libprocess/src/tests/socket_tests.cpp, line 289 > > <https://reviews.apache.org/r/28415/diff/1/?file=774765#file774765line289> > > > > How about using mktemp? Take a look at how we write (and clean up) > > after temporary files in the other tests. I took this example from another test, but I will switch to mktemp. Looking forward to fixing some of the inconsistencies! > On Nov. 25, 2014, 7:06 p.m., Niklas Nielsen wrote: > > 3rdparty/libprocess/src/tests/socket_tests.cpp, line 300 > > <https://reviews.apache.org/r/28415/diff/1/?file=774765#file774765line300> > > > > Why +2? Adding a comment in the code to explain this. We want to make sure we terminate with a \0 we set ourselves, and we're asking to read 1 more byte that we will be sent to check that the return of read is set correctly. > On Nov. 25, 2014, 7:06 p.m., Niklas Nielsen wrote: > > 3rdparty/libprocess/src/tests/socket_tests.cpp, line 303 > > <https://reviews.apache.org/r/28415/diff/1/?file=774765#file774765line303> > > > > Why +1? See previous comment. - Joris ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28415/#review63015 ----------------------------------------------------------- On Nov. 24, 2014, 10:15 p.m., Joris Van Remoortere wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28415/ > ----------------------------------------------------------- > > (Updated Nov. 24, 2014, 10:15 p.m.) > > > Review request for mesos, Benjamin Hindman and Niklas Nielsen. > > > Bugs: MESOS-2119 > https://issues.apache.org/jira/browse/MESOS-2119 > > > Repository: mesos-git > > > Description > ------- > > See summary. > > > Diffs > ----- > > 3rdparty/libprocess/Makefile.am aebd281da41325a0246f5c57780928afc22a1baa > 3rdparty/libprocess/src/tests/socket_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/28415/diff/ > > > Testing > ------- > > make check. > > > Thanks, > > Joris Van Remoortere > >
