Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 b1bbefd77 -> 2b57d59e3
PHOENIX-5026; another test addendum. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/2b57d59e Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/2b57d59e Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/2b57d59e Branch: refs/heads/4.x-HBase-0.98 Commit: 2b57d59e3b082a9019288b47a71831570b3aa93d Parents: b1bbefd Author: Lars Hofhansl <la...@apache.org> Authored: Sat Nov 24 16:36:35 2018 -0800 Committer: Lars Hofhansl <la...@apache.org> Committed: Sat Nov 24 16:36:35 2018 -0800 ---------------------------------------------------------------------- .../org/apache/phoenix/end2end/UpsertSelectAutoCommitIT.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/2b57d59e/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectAutoCommitIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectAutoCommitIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectAutoCommitIT.java index 344271f..c2faec8 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectAutoCommitIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectAutoCommitIT.java @@ -177,21 +177,19 @@ public class UpsertSelectAutoCommitIT extends ParallelStatsDisabledIT { props.setProperty(QueryServices.ENABLE_SERVER_SIDE_MUTATIONS, allowServerSideMutations); Connection conn = DriverManager.getConnection(getUrl(), props); conn.setAutoCommit(true); - conn.createStatement().execute("CREATE SEQUENCE keys"); String tableName = generateUniqueName(); + conn.createStatement().execute("CREATE SEQUENCE " + tableName + "_seq"); conn.createStatement().execute( "CREATE TABLE " + tableName + " (pk INTEGER PRIMARY KEY, val INTEGER)"); conn.createStatement().execute( - "UPSERT INTO " + tableName + " VALUES (NEXT VALUE FOR keys,1)"); + "UPSERT INTO " + tableName + " VALUES (NEXT VALUE FOR "+ tableName + "_seq, 1)"); for (int i=0; i<6; i++) { Statement stmt = conn.createStatement(); int upsertCount = stmt.executeUpdate( - "UPSERT INTO " + tableName + " SELECT NEXT VALUE FOR keys, val FROM " + tableName); + "UPSERT INTO " + tableName + " SELECT NEXT VALUE FOR "+ tableName + "_seq, val FROM " + tableName); assertEquals((int)Math.pow(2, i), upsertCount); } - // cleanup after ourselves - conn.createStatement().execute("DROP SEQUENCE keys"); conn.close(); }