Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new module ts_http_api_SUITE #1037

Merged
merged 2 commits into from
Apr 19, 2016
Merged

Conversation

hmmr
Copy link
Contributor

@hmmr hmmr commented Apr 8, 2016

RTS-258

Originally by @lehoff (submitted in #1015), with modifications per changes and fixes in basho/riak_kv#1398, now resubmitted against proper branch.

@hmmr
Copy link
Contributor Author

hmmr commented Apr 11, 2016

Now with additional commits with changes to account for a regression in basho/riak_kv#1378, and changes in query return type in basho/riak_kv#1382 post TTB merge. Requires basho/riak_pb#185.

@hmmr hmmr mentioned this pull request Apr 11, 2016
@hmmr hmmr force-pushed the feature-th+az-http_client branch from a20d644 to 3d7a233 Compare April 11, 2016 13:04
{<<"myseries">>, <<"varchar">>, false, 2, 2},
{<<"time">>, <<"timestamp">>, false, 3, 3},
{<<"weather">>, <<"varchar">>, false, undefined, undefined},
{<<"temperature">>,<<"double">>, true, undefined, undefined}]},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming the change from [] to undefined to mean null is OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so. In the original pb terms, undefineds are converted to [] in riak_pb_ts_codec, iirc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but shouldn't this remain unchanged? I confirmed that DESCRIBE does return undefined when using TTB encoding at the moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. Then it is something that came out unexpectedly from the merge. I'll investigate.

@hmmr hmmr force-pushed the feature-th+az-http_client branch 2 times, most recently from 1f28fcf to 9f7d561 Compare April 15, 2016 06:23
[{timetrap,{minutes,10}}].

init_per_suite(Config) ->
[_Node|_] = Cluster = ts_util:build_cluster(single),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to make sure the cluster is fully up and running before init_per_suite terminates or else the first test(s) may fail (Brett and I saw this happen).

Suggest rt:wait_until_nodes_ready/1.

@hazen
Copy link

hazen commented Apr 15, 2016

  • Missing single key GET tests

@hmmr hmmr force-pushed the feature-th+az-http_client branch from 422f060 to 8daf879 Compare April 17, 2016 19:39
@hmmr
Copy link
Contributor Author

hmmr commented Apr 17, 2016

@javajolt There is an implicit test for single-key get, in 8daf879#diff-fab6193d0172e564f9e34f4cda49fefdR189 and the foreach loop below.

@hmmr hmmr force-pushed the feature-th+az-http_client branch 2 times, most recently from f5d687f to a46e955 Compare April 18, 2016 18:53
@hmmr hmmr force-pushed the feature-th+az-http_client branch from a46e955 to e51626a Compare April 19, 2016 16:54
@hazen
Copy link

hazen commented Apr 19, 2016

curl test results:

shorty table create (POST) ... ok
shorty insert (POST) ... ok
shorty select (POST) ... ok
shorty list_keys (GET) ... ok
bad query (lexer error) (POST) ... ok
create table (missing key) (POST) ... ok
create table (POST) ... ok
describe table (POST) ... ok
put some data (POST) ... ok
put some bad data (bad key) (POST) ... ok
put some bad data (bad value) (POST) ... ok
put some bad data (missing value for non-null field) (POST) ... ok
single-key get (field-qualified) (GET) ... ok
single-key get (field-qualified, shuffled) (GET) ... ok
single-key non-existing get (GET) ... ok
single-key non-existing get (extra fields) (GET) ... ok
single-key non-existing get (missing fields) (GET) ... ok
single-key get (bad parameter) (GET) ... ok
single-key non-existing delete (DELETE) ... ok
list_keys (GET) ... ok
select query (POST) ... ok
single-key delete (DELETE) ... ok
select query (one record missing) (POST) ... ok
select query (empty) (POST) ... ok
bad get (wrong table) (GET) ... ok
bad put (nxkey) (PUT) ... ok
bad put (wrong table and parameters) (PUT) ... ok
bad query 1 (GET) ... ok
bad query 2 (PUT) ... ok
bad query 3 (POST) ... ok
bad query 4 (POST) ... ok

@hazen
Copy link

hazen commented Apr 19, 2016

👍 146a632

@hazen hazen merged commit 33e2330 into riak_ts-develop Apr 19, 2016
@hazen hazen deleted the feature-th+az-http_client branch April 19, 2016 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants