X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=test%2Fnewserver.cpp;h=59aa6ae4fa672494daaf16b5218de6524bd322ec;hp=c5ec6d232d6de02355b86e53c8c1993544aa21f7;hb=56f3994d74dbc36d10bfa83b50b016bf269ac563;hpb=c72238fb7fc6eb081c2a0bc95fff369c760343f4 diff --git a/test/newserver.cpp b/test/newserver.cpp index c5ec6d2..59aa6ae 100644 --- a/test/newserver.cpp +++ b/test/newserver.cpp @@ -164,6 +164,9 @@ class test_newserver : public TestFixture default: // parent { + // don't kill us on broken pipe + signal(SIGPIPE, SIG_IGN); + // wait till server is up sleep(1); socket_client_connection sc("./socket"); @@ -188,14 +191,7 @@ class test_newserver : public TestFixture catch(...) { throw; } - - // FIXME: This test won't work by design: - // The server closes the file descriptor - // and then reopens the server socket. - // Unfortunately the same socket # will be assigned - // and so the second write succeedes, too. -// CPPUNIT_ASSERT_EQUAL(string("error reading from socket : Connection reset by peer"),errormsg); - CPPUNIT_ASSERT_EQUAL(string(""),errormsg); + CPPUNIT_ASSERT_EQUAL(string("write() returned Bad file descriptor"),errormsg); } } }