Navigation Menu

Skip to content

Commit

Permalink
test: add a test to detect data loss by reindex
Browse files Browse the repository at this point in the history
GitHub: #646
  • Loading branch information
s-yata committed Apr 11, 2017
1 parent a071b5c commit b624579
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/command/suite/reindex/tags_table.expected
@@ -0,0 +1,19 @@
table_create Tags TABLE_HASH_KEY ShortText
[[0,0.0,0.0],true]
table_create Memos TABLE_NO_KEY
[[0,0.0,0.0],true]
column_create Memos tags COLUMN_VECTOR Tags
[[0,0.0,0.0],true]
column_create Tags memos_tags COLUMN_INDEX Memos tags
[[0,0.0,0.0],true]
load --table Memos
[
{"tags": ["job", "asap"]}
]
[[0,0.0,0.0],1]
select Tags --output_columns _key --sortby _key
[[0,0.0,0.0],[[[2],[["_key","ShortText"]],["asap"],["job"]]]]
reindex Tags
[[0,0.0,0.0],true]
select Tags --output_columns _key --sortby _key
[[0,0.0,0.0],[[[2],[["_key","ShortText"]],["asap"],["job"]]]]
17 changes: 17 additions & 0 deletions test/command/suite/reindex/tags_table.test
@@ -0,0 +1,17 @@
table_create Tags TABLE_HASH_KEY ShortText

table_create Memos TABLE_NO_KEY
column_create Memos tags COLUMN_VECTOR Tags

column_create Tags memos_tags COLUMN_INDEX Memos tags

load --table Memos
[
{"tags": ["job", "asap"]}
]

select Tags --output_columns _key --sortby _key

reindex Tags

select Tags --output_columns _key --sortby _key

0 comments on commit b624579

Please sign in to comment.