TritonDataCenter / java-manta

Java Manta Client SDK
Mozilla Public License 2.0
16 stars 26 forks source link

Unable to run MantaClientSigningIT with HTTP connections to Manta #534

Closed dekobon closed 4 years ago

dekobon commented 5 years ago

When running MantaClientSigningIT against an endpoint that uses HTTP (not HTTPS), the integration test fails:

[TestNG-test=Manta Job Tests-4] WARN  com.joyent.manta.http.MantaSSLConnectionSocketFactory [ ] - Configuration: tlsInsecure is true.  ALL TLS VERIFICATION IS DISABLED!
========================================
BaseChainedConfigContext{mantaURL='http://172.26.20.105:8080', user='jonran', mantaKeyId='4e:06:63:c4:f5:ac:16:38:0b:ea:22:24:0f:d3:1f:75', mantaKeyPath='/Users/jonran/.ssh/mac-work_id_rsa', timeout=4000, retries=3, maxConnections=24, httpBufferSize='4096', httpsProtocols='TLSv1.2', httpsCiphers='TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256', tlsInsecure=true, noAuth=false, disableNativeSignatures=false, tcpSocketTimeout=20000, connectionRequestTimeout=1000, verifyUploads=true, uploadBufferSize=16384, skipDirectoryDepth=null, pruneEmptyParentDepth=null, downloadContinuations=0, metricReporterMode=null, metricReporterOutputInterval=null, clientEncryptionEnabled=false, contentTypeDetectionEnabled=true, permitUnencryptedDownloads=false, encryptionAuthenticationMode=Mandatory, encryptionKeyId=null, encryptionAlgorithm=AES/CTR/NoPadding, encryptionPrivateKeyPath=null, encryptionPrivateKeyBytesLength=null object}
========================================
[main] WARN  com.joyent.manta.http.MantaSSLConnectionSocketFactory [ ] - Configuration: tlsInsecure is true.  ALL TLS VERIFICATION IS DISABLED!
[main] INFO  com.joyent.test.util.MantaPathSuiteListener [172.26.20.105 97d2d536-879e-11e9-baa7-e9d9377453de] - Removing base suite path: /jonran/stor/java-manta-integration-tests/bcd71a2a-f273-4cbe-a707-f1763fc04bb5/

[ERROR] Tests run: 609, Failures: 24, Errors: 0, Skipped: 17, Time elapsed: 2,510.284 s <<< FAILURE! - in TestSuite
[ERROR] testCanCreateSignedGETUriFromPath(com.joyent.manta.client.MantaClientSigningIT)  Time elapsed: 0.46 s  <<< FAILURE!
java.lang.ClassCastException: sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
    at com.joyent.manta.client.MantaClientSigningIT.openHttpURLConnection(MantaClientSigningIT.java:82)
    at com.joyent.manta.client.MantaClientSigningIT.testCanCreateSignedGETUriFromPath(MantaClientSigningIT.java:134)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)