Skip to content

Conversation

@alexmoore
Copy link
Contributor

@alexmoore alexmoore commented Aug 11, 2016

Fixes Null Pointer exception for #656, do some cleanup surrounding $bucket & $key indices.

latch.await();
}

@Override
Copy link

Choose a reason for hiding this comment

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

Up on line 331 above, there's another call to await with a timeout. This is the only place I can find left in the code (there are a few in the tests too) that calls await with a timeout but ignores the return value. Because it checks isDone afterwards, ignoring the return value does seem OK, though perhaps a comment would help.

For what it's worth, the test code ignores the return value here:

https://github.com/basho/riak-java-client/blob/expand-coverage-api/src/test/java/com/basho/riak/client/api/commands/itest/ITestMultiDelete.java#L40

https://github.com/basho/riak-java-client/blob/expand-coverage-api/src/test/java/com/basho/riak/client/core/operations/itest/ITestListBucketsOperation.java#L159

https://github.com/basho/riak-java-client/blob/expand-coverage-api/src/test/java/com/basho/riak/client/core/operations/itest/ITestListKeysOperation.java#L177

…per converting null string to BinaryValue in BinIndexQuery.java
@alexmoore alexmoore changed the base branch from develop to make-integration-tests-great-again August 16, 2016 13:47
@alexmoore alexmoore changed the title Not Ready: Expand coverage api to include match and range parameters. Ready: Fix Null Pointer exception in #656. Aug 16, 2016
@alexmoore
Copy link
Contributor Author

@srgg Getting 2 errors with the latest commits:

Running com.basho.riak.client.api.commands.indexes.itest.ITestFullBucketRead
Tests run: 5, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 2.063 sec <<< FAILURE! - in com.basho.riak.client.api.commands.indexes.itest.ITestFullBucketRead
readPlainTextValues(com.basho.riak.client.api.commands.indexes.itest.ITestFullBucketRead)  Time elapsed: 0.004 sec  <<< ERROR!
java.lang.IllegalArgumentException: An index key or range or coverageContext must be supplied
        at com.basho.riak.client.api.commands.indexes.itest.ITestFullBucketRead.readPlainTextValues(ITestFullBucketRead.java:103)

readPlainTextValuesWithReturnBody(com.basho.riak.client.api.commands.indexes.itest.ITestFullBucketRead)  Time elapsed: 0 sec  <<< ERROR!
java.lang.IllegalArgumentException: An index key or range or coverageContext must be supplied
        at com.basho.riak.client.api.commands.indexes.itest.ITestFullBucketRead.readPlainTextValuesWithReturnBody(ITestFullBucketRead.java:126)

I think we still need the bucket name provided in the match parameter to make a correct 2i query, even with a coverage context.

@alexmoore
Copy link
Contributor Author

alexmoore commented Aug 16, 2016

We can't let the match value be null: [set null], [throw error on null].

@alexmoore alexmoore merged commit 8833f86 into make-integration-tests-great-again Aug 16, 2016
@alexmoore alexmoore deleted the expand-coverage-api branch September 7, 2016 20:26
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