HADOOP-13183. S3A proxy tests fail after httpclient/httpcore upgrade. Contributed by Steve Loughran.
(cherry picked from commit 93258459faf56bc84121ba99d20eaef95273329e) (cherry picked from commit 60e5397a9bb6a1d8ca6a09c2893108af77dc96c3)
This commit is contained in:
parent
f102c4f6c8
commit
dbff8f2932
@ -123,9 +123,7 @@ public void testProxyConnection() throws Exception {
|
||||
fs = S3ATestUtils.createTestFileSystem(conf);
|
||||
fail("Expected a connection error for proxy server at " + proxy);
|
||||
} catch (AmazonClientException e) {
|
||||
if (!e.getMessage().contains(proxy + " refused")) {
|
||||
throw e;
|
||||
}
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,18 +154,14 @@ public void testAutomaticProxyPortSelection() throws Exception {
|
||||
fs = S3ATestUtils.createTestFileSystem(conf);
|
||||
fail("Expected a connection error for proxy server");
|
||||
} catch (AmazonClientException e) {
|
||||
if (!e.getMessage().contains("443")) {
|
||||
throw e;
|
||||
}
|
||||
// expected
|
||||
}
|
||||
conf.set(Constants.SECURE_CONNECTIONS, "false");
|
||||
try {
|
||||
fs = S3ATestUtils.createTestFileSystem(conf);
|
||||
fail("Expected a connection error for proxy server");
|
||||
} catch (AmazonClientException e) {
|
||||
if (!e.getMessage().contains("80")) {
|
||||
throw e;
|
||||
}
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user