Skip to content

Expand test coverage for GrpcResultSet and runWithRetries()#3702

Merged
pongad merged 7 commits intogoogleapis:masterfrom
nithinsujir:covg3
Sep 27, 2018
Merged

Expand test coverage for GrpcResultSet and runWithRetries()#3702
pongad merged 7 commits intogoogleapis:masterfrom
nithinsujir:covg3

Conversation

@nithinsujir
Copy link

@nithinsujir nithinsujir commented Sep 19, 2018

The coverage is now at 84% for Instructions and 81% for Branches.

Signed-off-by: Nithin Nayak Sujir <nsujir@google.com>
@nithinsujir nithinsujir requested a review from pongad as a code owner September 19, 2018 16:11
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 19, 2018
@nithinsujir nithinsujir changed the title WIP: Expand test coverage for GrpcResultSet and runWithRetries() Expand test coverage for GrpcResultSet and runWithRetries() Sep 19, 2018
@nithinsujir
Copy link
Author

R: @biswanag

Copy link
Contributor

@snehashah16 snehashah16 left a comment

Choose a reason for hiding this comment

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

if possible, could u also add code coverage stats in these reviews..

.build());
consumer.onCompleted();
resultSet.next();
assertThat(resultSet.getBoolean(0));

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


resultSet.next();
Double d = resultSet.getDouble(0);
assertThat(d.equals(Double.MIN_VALUE));

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

consumer.onCompleted();
resultSet.next();

assertThat(resultSet.getDoubleArray(0).equals(dArray));

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

consumer.onCompleted();

resultSet.next();
assertThat(resultSet.getTimestamp(0) == Timestamp.parseTimestamp("0001-01-01T00:00:00Z"));

This comment was marked as spam.

consumer.onCompleted();

resultSet.next();
assertThat(resultSet.getDate(0).compareTo(Date.fromYearMonthDay(2018, 5, 29)) == 0);

This comment was marked as spam.

@nithinsujir
Copy link
Author

nithinsujir commented Sep 19, 2018 via email


resultSet.next();
Double d = resultSet.getDouble(0);
assertThat(d.equals(Double.MIN_VALUE));

This comment was marked as spam.

Double d = resultSet.getDouble(0);
assertThat(d.equals(Double.MIN_VALUE));
resultSet.next();
assertThat(resultSet.getDouble(0)).isWithin(0.0).of(Double.MAX_VALUE);

This comment was marked as spam.

This comment was marked as spam.

consumer.onCompleted();

resultSet.next();
assertThat(resultSet.getDate(0)

This comment was marked as spam.

This comment was marked as spam.

assertThat(row).isEqualTo(copy);
}

@Test

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Copy link
Contributor

@snehashah16 snehashah16 left a comment

Choose a reason for hiding this comment

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

LGTM

assertThat(row).isEqualTo(copy);
}

@Test

This comment was marked as spam.

}
});
} catch (SpannerException e) {
assertThat(e.getErrorCode() == ErrorCode.INTERNAL);

This comment was marked as spam.

This comment was marked as spam.

@pongad
Copy link
Contributor

pongad commented Sep 26, 2018

@nithinsujir This LGTM, are we good to merge?

@nithinsujir
Copy link
Author

@pongad Yes, this is good to go, thanks.

@pongad pongad merged commit c79f280 into googleapis:master Sep 27, 2018
@nithinsujir nithinsujir deleted the covg3 branch September 28, 2018 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants