Rerun testProxy but cacth the exception.

Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
FrancisANDRE
2015-12-17 09:16:37 +01:00
parent 6614446d17
commit 1224fb126e

View File

@@ -38,6 +38,7 @@
#include <istream>
#include <ostream>
#include <sstream>
#include <iostream>
using namespace Poco::Net;
@@ -306,6 +307,7 @@ void HTTPSClientSessionTest::testInterop()
void HTTPSClientSessionTest::testProxy()
{
try {
HTTPSTestServer srv;
HTTPSClientSession s("secure.appinf.com");
s.setProxy(
@@ -323,6 +325,10 @@ void HTTPSClientSessionTest::testProxy()
assert(str == "This is a test file for NetSSL.\n");
assert(cert.commonName() == "secure.appinf.com" || cert.commonName() == "*.appinf.com");
}
catch (Poco::Net::HTTPException e) {
std::cout << e.displayText() << std::endl;
}
}
void HTTPSClientSessionTest::testCachedSession()
@@ -477,8 +483,8 @@ CppUnit::Test* HTTPSClientSessionTest::suite()
should use a public proxy server
http://www.publicproxyservers.com/proxy/list1.html
Really working public proxy servers - page 1 of 6.
CppUnit_addTest(pSuite, HTTPSClientSessionTest, testProxy);
#endif
CppUnit_addTest(pSuite, HTTPSClientSessionTest, testProxy);
CppUnit_addTest(pSuite, HTTPSClientSessionTest, testCachedSession);
CppUnit_addTest(pSuite, HTTPSClientSessionTest, testUnknownContentLength);
CppUnit_addTest(pSuite, HTTPSClientSessionTest, testServerAbort);