Skip to content

Commit

Permalink
PHOENIX-1571 Replace hard-coded date
Browse files Browse the repository at this point in the history
Replace a "far away future" hard-coded date in an integration test
with something that is no longer in the past.
  • Loading branch information
Gabriel Reid committed Jan 2, 2015
1 parent d2be502 commit 2c58b1f
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -266,7 +266,7 @@ public void testGroupByRowKeyColumns() throws Exception {
@Test
public void testSkipScan() throws Exception {
long ts = nextTimestamp();
String query = "SELECT HOST FROM PTSDB WHERE INST='abc' AND DATE>=TO_DATE('1970-01-01 00:00:00') AND DATE <TO_DATE('2015-01-01 00:00:00')";
String query = "SELECT HOST FROM PTSDB WHERE INST='abc' AND DATE>=TO_DATE('1970-01-01 00:00:00') AND DATE <TO_DATE('2171-01-01 00:00:00')";
String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" + (ts + 5); // Run query at timestamp 5
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
Connection conn = DriverManager.getConnection(url, props);
Expand Down Expand Up @@ -776,7 +776,7 @@ public void testBatchUpsert() throws Exception {
}
conn.commit();
conn.close();

// Query at a time after the upsert to confirm they took place
props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts+1));
conn = DriverManager.getConnection(getUrl(), props);
Expand Down Expand Up @@ -1378,7 +1378,7 @@ public void testRegexpSubstrFunction2() throws Exception {
String ddl = "create table t (k INTEGER NOT NULL PRIMARY KEY, name VARCHAR)";
conn.createStatement().execute(ddl);
conn.close();

String dml = "upsert into t values(?,?)";
props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts+2));
conn = DriverManager.getConnection(url, props);
Expand All @@ -1391,7 +1391,7 @@ public void testRegexpSubstrFunction2() throws Exception {
}
conn.commit();
conn.close();

// This matches what Oracle returns for regexp_substr, even through
// it seems oke for "satax", it should return null.
String query = "select regexp_substr(name,'[^s]+',1) from t limit 5";
Expand Down

0 comments on commit 2c58b1f

Please sign in to comment.