You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2014/01/31 03:31:41 UTC
git commit: Replace obsolete test with test that confirms that going
from MULTI_TENANT=true to MULTI_TENANT=false is disallowed
Updated Branches:
refs/heads/master 24910777d -> b2a8e2dd2
Replace obsolete test with test that confirms that going from MULTI_TENANT=true to MULTI_TENANT=false is disallowed
Project: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/commit/b2a8e2dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/tree/b2a8e2dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/diff/b2a8e2dd
Branch: refs/heads/master
Commit: b2a8e2dd2f1f6f6ede4392a8e0765301cd37c976
Parents: 2491077
Author: James Taylor <ja...@apache.org>
Authored: Thu Jan 30 18:31:33 2014 -0800
Committer: James Taylor <ja...@apache.org>
Committed: Thu Jan 30 18:31:33 2014 -0800
----------------------------------------------------------------------
.../phoenix/end2end/TenantSpecificTablesDDLTest.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/b2a8e2dd/phoenix-core/src/test/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLTest.java b/phoenix-core/src/test/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLTest.java
index 807aff7..e86aedc 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLTest.java
@@ -89,12 +89,15 @@ public class TenantSpecificTablesDDLTest extends BaseTenantSpecificTablesTest {
}
@Test
- public void testCreateTenantTableWithDifferentTypeId() throws Exception {
+ public void testAlterMultiTenantWithViewsToGlobal() throws Exception {
+ Properties props = new Properties();
+ props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(nextTimestamp()));
+ Connection conn = DriverManager.getConnection(getUrl(), props);
try {
- createTestTable(PHOENIX_JDBC_TENANT_SPECIFIC_URL, TENANT_TABLE_DDL.replace(TENANT_TYPE_ID, "000"), null, nextTimestamp(), false);
- fail();
+ conn.createStatement().execute("alter table " + PARENT_TABLE_NAME + " set MULTI_TENANT=false");
+ } catch (SQLException e) {
+ assertEquals(SQLExceptionCode.CANNOT_MUTATE_TABLE.getErrorCode(), e.getErrorCode());
}
- catch (TableAlreadyExistsException expected) {}
}
@Test