Added test, corrected tag name.

This commit is contained in:
andytill 2016-04-14 14:58:15 +00:00
parent 409a463dbf
commit 8f9cfb6c58
2 changed files with 21 additions and 1 deletions

View File

@ -19,7 +19,7 @@
{riakhttpc, ".*", {git, "git://github.com/basho/riak-erlang-http-client", {branch, "riak_ts-develop"}}},
{kvc, "1.3.0", {git, "https://github.com/etrepum/kvc", {tag, "v1.3.0"}}},
{druuid, ".*", {git, "git://github.com/kellymclaughlin/druuid.git", {tag, "0.2"}}},
{tdiff, ".*", {git, "git://github.com/tomas-abrahamsson/tdiff", {branch, "v0.0.1"}}}
{tdiff, ".*", {git, "git://github.com/tomas-abrahamsson/tdiff", {tag, "0.1"}}}
]}.
{escript_incl_apps, [goldrush, lager, getopt, riakhttpc, riakc, ibrowse, mochiweb, kvc, tdiff]}.

View File

@ -720,3 +720,23 @@ all_timestamps_single_quanta_test(Ctx) ->
{rt_ignore_columns,Results},
riakc_ts:query(client_pid(Ctx), Query)
).
%%%
%%%
%%%
partition_key_appears_twice_test(Ctx) ->
ts_util:assert_row_sets({[],[]},riakc_ts:query(client_pid(Ctx),
"CREATE TABLE table1 ("
"a SINT64 NOT NULL, "
"c TIMESTAMP NOT NULL, "
"PRIMARY KEY ((a,c,quantum(c, 1, 's')), a,c,c))")),
ok = riakc_ts:put(client_pid(Ctx), <<"table1">>, [[1,N] || N <- lists:seq(1,3000)]),
Query =
"SELECT * FROM table1 WHERE a = 1 AND c > 0 AND c < 11",
Results =
[{1,N} || N <- lists:seq(1,10)],
ts_util:assert_row_sets(
{column_names_def_1(), Results},
riakc_ts:query(client_pid(Ctx), Query)
).