Skip to content
Permalink
Browse files

fix:Test Case HostSpecTest , tests testShouldResolveWithEmptySocksPro…

…xyHost and testShouldResolveWithWhiteSpaceSocksProxyHost (#1424)

Added HostSpecTest to Jdbc2TestSuite and removed duplicates from same
Fixes #1423
  • Loading branch information...
davecramer committed Feb 26, 2019
1 parent fe7eda3 commit 0c5cf475d35fb73d921eac922089cf4406e48c9d
@@ -18,6 +18,7 @@
import org.postgresql.test.core.NativeQueryBindLengthTest;
import org.postgresql.test.core.OptionsPropertyTest;
import org.postgresql.test.util.ExpressionPropertiesTest;
import org.postgresql.test.util.HostSpecTest;
import org.postgresql.test.util.LruCacheTest;
import org.postgresql.test.util.ServerVersionParseTest;
import org.postgresql.test.util.ServerVersionTest;
@@ -45,23 +46,11 @@
ColumnSanitiserDisabledTest.class,
ColumnSanitiserEnabledTest.class,
LruCacheTest.class,
HostSpecTest.class,
ReaderInputStreamTest.class,
ServerVersionParseTest.class,
ServerVersionTest.class,

DriverTest.class,
ConnectionTest.class,
DatabaseMetaDataTest.class,
DatabaseMetaDataPropertiesTest.class,
SearchPathLookupTest.class,
EncodingTest.class,
ExpressionPropertiesTest.class,
ColumnSanitiserDisabledTest.class,
ColumnSanitiserEnabledTest.class,
LruCacheTest.class,
ReaderInputStreamTest.class,
ServerVersionParseTest.class,
ServerVersionTest.class,
OptionsPropertyTest.class,

TypeCacheDLLStressTest.class,
@@ -36,14 +36,14 @@ public void testShouldResolve() throws Exception {
public void testShouldResolveWithEmptySocksProxyHost() throws Exception {
System.setProperty("socksProxyHost", "");
HostSpec hostSpec = new HostSpec("localhost", 5432);
assertFalse(hostSpec.shouldResolve());
assertTrue(hostSpec.shouldResolve());
}

@Test
public void testShouldResolveWithWhiteSpaceSocksProxyHost() throws Exception {
System.setProperty("socksProxyHost", " ");
HostSpec hostSpec = new HostSpec("localhost", 5432);
assertFalse(hostSpec.shouldResolve());
assertTrue(hostSpec.shouldResolve());
}

@Test

0 comments on commit 0c5cf47

Please sign in to comment.
You can’t perform that action at this time.