2010-08-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Wait data arrives at clientSocket_ in
	FtpConnectionTest::testReceiveEpsvResponse().
	* test/FtpConnectionTest.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2010-08-28 04:40:51 +00:00
parent 6a675e525c
commit d5bb40ce9e
2 changed files with 11 additions and 0 deletions

View file

@ -310,22 +310,27 @@ void FtpConnectionTest::testReceiveEpsvResponse()
CPPUNIT_ASSERT_EQUAL((uint16_t)12000, port);
serverSocket_->writeData("229 Success |||12000|)\r\n");
waitRead(clientSocket_);
CPPUNIT_ASSERT_EQUAL((unsigned int)229, ftp_->receiveEpsvResponse(port));
CPPUNIT_ASSERT_EQUAL((uint16_t)0, port);
serverSocket_->writeData("229 Success (|||12000|\r\n");
waitRead(clientSocket_);
CPPUNIT_ASSERT_EQUAL((unsigned int)229, ftp_->receiveEpsvResponse(port));
CPPUNIT_ASSERT_EQUAL((uint16_t)0, port);
serverSocket_->writeData("229 Success ()|||12000|\r\n");
waitRead(clientSocket_);
CPPUNIT_ASSERT_EQUAL((unsigned int)229, ftp_->receiveEpsvResponse(port));
CPPUNIT_ASSERT_EQUAL((uint16_t)0, port);
serverSocket_->writeData("229 Success )(|||12000|)\r\n");
waitRead(clientSocket_);
CPPUNIT_ASSERT_EQUAL((unsigned int)229, ftp_->receiveEpsvResponse(port));
CPPUNIT_ASSERT_EQUAL((uint16_t)0, port);
serverSocket_->writeData("229 Success )(||12000|)\r\n");
waitRead(clientSocket_);
CPPUNIT_ASSERT_EQUAL((unsigned int)229, ftp_->receiveEpsvResponse(port));
CPPUNIT_ASSERT_EQUAL((uint16_t)0, port);
}