-
Notifications
You must be signed in to change notification settings - Fork 16
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
adding nosqlbench test scripts #118
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have some questions and some improvement suggestions..
blocks: | ||
schema: | ||
ops: | ||
create-namespace: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add response assertions for everything? We pretty much know that everything must be 200
, that schema change commands respond with "ok": 1
(or smth like that), that insert docs would return inserted id, etc.. Also we should confirm if possible that there are no errors in the returned body.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we should not do this. The response assertions are used to determine when the script should abort. There is a very limited case where we'd want to do this - if the setup (schema creation) fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is true, assertions do not stop the script. The reason why I think that's important, is to be certain we are getting time results for correctly executed use-cases and not for error cases. Cause often error cases would actually be faster. Think about missing coordinator, this test would run really fast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One possible problem is if there is no check that reads should target documents actually written: if not, we'd get 404 (correctly) when trying to access non-existing documents. So return value depends on true existence of document(s). I agree it would be very useful to have sanity checks so that we do not accidentally "test" performance of broken tests (nothing found, ever, which can be fast).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some ideas on this, but I don't have any really prescriptive answers so far. I do think that the answers come more easily if you know exactly what you are testing for. i.e, correctness, performance, etc. But in this case, we generally want to verify that schema creation works all the time but we want to allow for some "empty reads" in performance tests. If you say instead that you are doing a correctness test, then you move more towards wanting to qualify each and every result.
While it is fairly easy to construct bindings which can be used for correctness assertions the second time you do it, the first time is often a learning exercise. But, it is quite doable. [You can use specific strategies for building bindings] so that you know which operations should return non-empty results and which ones should, or even how many results each operation should return.
So, my main question is, what exactly are you testing for in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not saying specifically for the schema change responses, I am saying lets add it everywhere. But question is actually good, what do we want from these tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per Shooky's example, we do want to allow empty reads. These are performance tests, not correctness tests.
By default the tests do exit on error condition, but we can override this with the setting errors=count
to get statistics on errors which we can then analyze.
According to the JSON API spec this service is going to return 200 for basically everything except 500 server error. So identifying error conditions per call will require more work. We'll probably need to do something like
ok-status: "200"
ok-body: "some regex"
IMO that's beyond the scope of this initial PR. I'd just like to get these checked in initially and begin running them regularly, and then we can improve the tests as we go.
X-Cassandra-Request-Id: "{request_id}" | ||
X-Cassandra-Token: "<<auth_token:my_auth_token>>" | ||
Content-Type: "application/json" | ||
ok-status: "[2-4][0-9][0-9]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
400 is not ok, fix everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service never returns a 4xx anyway, according to current spec. It's 200 or 500.
"find" : { | ||
"filter" : { | ||
"match1" : { | ||
"in": [0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is currently not supported, do we want it merged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSON API did not generate an error on a test run. But I can comment out this step for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- what the hack, how is this not reporting an error? @maheshrajamani @tatu-at-datastax
- in addition, should this anyway be
$in
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving to unblock, as I will not be here tomorrow. I resolved all the conversations that were addressed. Few unresolved are still there, please resolve before merging.
No description provided.