Skip to content

Commit

Permalink
Merge pull request #2045 from crate/h/fix-tests
Browse files Browse the repository at this point in the history
fixed tests
  • Loading branch information
chaudum committed May 19, 2015
2 parents ad09c64 + 7a5179a commit 64107d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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%'");
Expand Down

0 comments on commit 64107d5

Please sign in to comment.