Github user JamesRTaylor commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/12#discussion_r17617124
--- Diff:
phoenix-core/src/it/java/org/apache/phoenix/end2end/DefaultParallelIteratorsRegionSplitterIT.java
---
@@ -124,25 +124,22 @@ public void testGetSplits() throws Exception {
}
@Test
- public void testGetLowerUnboundSplits() throws Exception {
+ public void testGetLowerUnboundSplits() throws Throwable {
long ts = nextTimestamp();
initTableValues(ts);
String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB +
"=" + ts;
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
Connection conn = DriverManager.getConnection(url, props);
-
+ PreparedStatement stmt = conn.prepareStatement("ANALYZE STABLE");
+ stmt.execute();
+ conn.close();
+ conn = DriverManager.getConnection(url, props);
+ conn.createStatement().executeQuery("SELECT * FROM STABLE");
Scan scan = new Scan();
-
- ConnectionQueryServices services =
driver.getConnectionQueryServices(getUrl(),
PropertiesUtil.deepCopy(TEST_PROPERTIES));
- TableRef table = getTableRef(conn,ts);
- services.getStatsManager().updateStats(table);
scan.setStartRow(HConstants.EMPTY_START_ROW);
scan.setStopRow(K1);
List<KeyRange> keyRanges = getSplits(conn, ts, scan);
- assertEquals("Unexpected number of splits: " + keyRanges, 3,
keyRanges.size());
- assertEquals(newKeyRange(KeyRange.UNBOUND, new byte[] {'7'}),
keyRanges.get(0));
- assertEquals(newKeyRange(new byte[] {'7'}, new byte[] {'M'}),
keyRanges.get(1));
- assertEquals(newKeyRange(new byte[] {'M'}, K3), keyRanges.get(2));
+ assertEquals("Unexpected number of splits: " + keyRanges, 1,
keyRanges.size());
--- End diff --
Can we assert the guidepost byte[] value here?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---