James Taylor created PHOENIX-2846:
-------------------------------------
Summary: Fix CreateTableIT.testCreateTableWithoutSchema()
Key: PHOENIX-2846
URL: https://issues.apache.org/jira/browse/PHOENIX-2846
Project: Phoenix
Issue Type: Bug
Reporter: James Taylor
Assignee: Ankit Singhal
>From your namespace enhancement, you added the
>CreateTableIT.testCreateTableWithoutSchema() but aren't managing the timestamp
>yourself as required by tests derived from BaseClientManagedTimeIT through
>code like this:
{code}
long ts = nextTimestamp();
Properties props = new Properties();
props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts));
{code}
This will lead to other tests failing with a NewTableAlreadyExistsException.
We're trying to move away from tests that derive from BaseClientManagedTimeIT,
so the best fix is to derive from the new BaseHBaseManagedTimeTableReuseIT and
follow the same pattern as other tests to get the table name from the test util
function. These tests will execute much faster because the underlying HBase
metadata never needs to be dropped. You'd need to get rid of the setting of the
CURRENT_SCN property and then there's no need to open new connections all the
time.
Another slightly less idea fix is to derive from BaseHBaseManagedTimeIT base
class instead, and also get rid of the setting of the CURRENT_SCN property.
Another fix would be to just set the CURRENT_SCN property for your new test.
However, that would not be increasing the greater good as much. :-)
Appreciate if you could double check for other occurrences of this over your
last few check-ins too.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)