From 7a5179a040c1801559282e0f489a2e45c2af739f Mon Sep 17 00:00:00 2001 From: Christian Haudum Date: Tue, 19 May 2015 15:56:54 +0200 Subject: [PATCH] fixed tests --- .../integrationtests/InformationSchemaTest.java | 14 ++------------ .../PartitionedTableIntegrationTest.java | 10 +++------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/sql/src/test/java/io/crate/integrationtests/InformationSchemaTest.java b/sql/src/test/java/io/crate/integrationtests/InformationSchemaTest.java index 55af2b7e14ac..6947f6d00f4d 100644 --- a/sql/src/test/java/io/crate/integrationtests/InformationSchemaTest.java +++ b/sql/src/test/java/io/crate/integrationtests/InformationSchemaTest.java @@ -803,18 +803,8 @@ public void testUnknownTypes() throws Exception { @Test public void testTableSettings() throws Exception { execute("create table table_props (name string) with (number_of_replicas=0)"); - execute("select settings['blocks'], settings['routing'], settings['recovery'], settings['warmer'], settings['translog'] "+ - "from information_schema.tables where table_name='table_props'"); - assertEquals("{metadata=false, read=false, read_only=false, write=false}", - response.rows()[0][0].toString()); - assertEquals("{allocation={enable=all, total_shards_per_node=-1}}", - response.rows()[0][1].toString()); - assertEquals("{initial_shards=quorum}", - response.rows()[0][2].toString()); - assertEquals("{enabled=true}", - response.rows()[0][3].toString()); - assertEquals("{disable_flush=false, flush_threshold_period=30m, flush_threshold_ops=2147483647, flush_threshold_size=200mb, interval=5s}", - response.rows()[0][4].toString()); + execute("select settings from information_schema.tables where table_name='table_props'"); + assertEquals(defaultTableSettings, response.rows()[0][0]); execute("select settings from information_schema.tables where table_name='nodes' and schema_name='sys'"); assertEquals(null, response.rows()[0][0]); } diff --git a/sql/src/test/java/io/crate/integrationtests/PartitionedTableIntegrationTest.java b/sql/src/test/java/io/crate/integrationtests/PartitionedTableIntegrationTest.java index 77b5c93b5824..2e345ca391f4 100644 --- a/sql/src/test/java/io/crate/integrationtests/PartitionedTableIntegrationTest.java +++ b/sql/src/test/java/io/crate/integrationtests/PartitionedTableIntegrationTest.java @@ -161,13 +161,9 @@ public void testCopyFromPartitionedTableCustomSchema() throws Exception { ensureGreen(); waitNoPendingTasksOnAll(); - execute("select * from information_schema.tables where schema_name='my_schema' and table_name='parted'"); - assertThat(TestingHelpers.printedTable(response.rows()), is("my_schema| parted| 5| 0| _id| [month]| NULL| "+ - "{routing={allocation={enable=all, total_shards_per_node=-1}},"+ - " translog={disable_flush=false, flush_threshold_period=30m, flush_threshold_ops=2147483647, flush_threshold_size=200mb, interval=5s},"+ - " blocks={metadata=false, read=false, read_only=false, write=false},"+ - " recovery={initial_shards=quorum},"+ - " warmer={enabled=true}}\n")); + execute("select schema_name, table_name, number_of_shards, number_of_replicas, clustered_by, partitioned_by "+ + "from information_schema.tables where schema_name='my_schema' and table_name='parted'"); + assertThat(TestingHelpers.printedTable(response.rows()), is("my_schema| parted| 5| 0| _id| [month]\n")); // no other tables with that name, e.g. partitions considered as tables or such execute("select schema_name, table_name from information_schema.tables where table_name like '%parted%'");