Permalink
Browse files

refactor: remove checks for jdk version 1.4 (tests) (#737)

remove checks for jdk version 1.4 in the tests
  • Loading branch information...
AlexElin authored and davecramer committed Jan 22, 2017
1 parent da5e4ef commit ee51dfce99dcd922b66373cd0c69c83bf339dbdb
@@ -95,28 +95,17 @@ public void testGetTimeZone() throws Exception {
timestamp = rs.getTimestamp(1);
assertNotNull(timestamp);

// Pre 1.4 JVM's considered the nanos field completely separate
// and wouldn't return it in getTime()
if (TestUtil.haveMinimumJVMVersion("1.4")) {
assertEquals(100, extractMillis(timestamp.getTime()));
} else {
assertEquals(100, extractMillis(timestamp.getTime() + timestamp.getNanos() / 1000000));
}
assertEquals(100, extractMillis(timestamp.getTime()));

assertEquals(100000000, timestamp.getNanos());

Time timetz = rs.getTime(2);
assertNotNull(timetz);
assertEquals(10, extractMillis(timetz.getTime()));
timestamptz = rs.getTimestamp(2);
assertNotNull(timestamptz);
assertEquals(10, extractMillis(timestamptz.getTime()));

// Pre 1.4 JVM's considered the nanos field completely separate
// and wouldn't return it in getTime()
if (TestUtil.haveMinimumJVMVersion("1.4")) {
assertEquals(10, extractMillis(timestamptz.getTime()));
} else {
assertEquals(10, extractMillis(timestamptz.getTime() + timestamptz.getNanos() / 1000000));
}
assertEquals(10000000, timestamptz.getNanos());

assertTrue(rs.next());
@@ -5,7 +5,6 @@

package org.postgresql.test.jdbc2.optional;

import junit.framework.TestSuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

@@ -21,6 +20,6 @@
ConnectionPoolTest.class,
PoolingDataSourceTest.class,
CaseOptimiserDataSourceTest.class})
public class OptionalTestSuite extends TestSuite {
public class OptionalTestSuite {

}

0 comments on commit ee51dfc

Please sign in to comment.