Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

feat: remove internal::TimestampFromCounts() #1183

Merged
merged 2 commits into from
Jan 10, 2020

Conversation

devbww
Copy link
Contributor

@devbww devbww commented Jan 10, 2020

The internal RFC3339 and protobuf conversions to/from Timestamp,
along with the public std::chrono::time_point conversions, are
sufficient for our testing needs.

Also add a new test Timestamp.RegularSemantics, and extend test
Timestamp.RelationalOperators to cover inequalities.


This change is Reviewable

The internal RFC3339 and protobuf conversions to/from `Timestamp`,
along with the public `std::chrono::time_point` conversions, are
sufficient for our testing needs.

Also add a new test Timestamp.RegularSemantics, and extend test
Timestamp.RelationalOperators to cover inequalities.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 10, 2020
@codecov
Copy link

codecov bot commented Jan 10, 2020

Codecov Report

Merging #1183 into master will decrease coverage by 0.04%.
The diff coverage is 98.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1183      +/-   ##
==========================================
- Coverage   95.61%   95.57%   -0.05%     
==========================================
  Files         175      175              
  Lines       13554    13567      +13     
==========================================
+ Hits        12960    12967       +7     
- Misses        594      600       +6
Impacted Files Coverage Δ
google/cloud/spanner/timestamp.cc 94.11% <ø> (-1.18%) ⬇️
google/cloud/spanner/timestamp.h 93.1% <ø> (+1.79%) ⬆️
google/cloud/spanner/value_test.cc 99.08% <100%> (ø) ⬆️
google/cloud/spanner/client_test.cc 94.81% <100%> (ø) ⬆️
...r/integration_tests/data_types_integration_test.cc 100% <100%> (ø) ⬆️
...le/cloud/spanner/internal/transaction_impl_test.cc 97.53% <100%> (ø) ⬆️
...gle/cloud/spanner/internal/connection_impl_test.cc 98.82% <100%> (ø) ⬆️
google/cloud/spanner/timestamp_test.cc 100% <100%> (ø) ⬆️
.../spanner/benchmarks/multiple_rows_cpu_benchmark.cc 92.54% <83.33%> (-0.09%) ⬇️
...loud/spanner/internal/partial_result_set_resume.cc 90.9% <0%> (-4.55%) ⬇️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d00165...32d26f9. Read the comment docs.

@devbww devbww marked this pull request as ready for review January 10, 2020 07:53
@devbww devbww requested a review from devjgm January 10, 2020 07:53
Copy link
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 10 of 10 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @devbww and @devjgm)


google/cloud/spanner/timestamp_test.cc, line 89 at r1 (raw file):

TEST(Timestamp, FromRFC3339) {
  EXPECT_EQ(internal::TimestampFromProto(MakeProtoTimestamp(1561135942, 0)),

nit: can you document how the strings are created? A future me trying to change one of these tests would like to know.

Add a note about one mechanism for externally converting between
std::time_t values and UTC strings, possibly for use when adding
test cases.
Copy link
Contributor Author

@devbww devbww left a comment

Choose a reason for hiding this comment

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

Reviewable status: 9 of 10 files reviewed, all discussions resolved (waiting on @coryan and @devjgm)


google/cloud/spanner/timestamp_test.cc, line 89 at r1 (raw file):

Previously, coryan (Carlos O'Ryan) wrote…

nit: can you document how the strings are created? A future me trying to change one of these tests would like to know.

Done.

Copy link
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @devjgm)

@devbww devbww merged commit 24609cd into googleapis:master Jan 10, 2020
@devbww devbww deleted the timestamp-fromcounts branch January 10, 2020 16:34
devjgm pushed a commit to devjgm/google-cloud-cpp that referenced this pull request May 7, 2020
…-cpp-spanner#1183)

* feat: remove internal::TimestampFromCounts()

The internal RFC3339 and protobuf conversions to/from `Timestamp`,
along with the public `std::chrono::time_point` conversions, are
sufficient for our testing needs.

Also add a new test Timestamp.RegularSemantics, and extend test
Timestamp.RelationalOperators to cover inequalities.

* Address review comment

Add a note about one mechanism for externally converting between
std::time_t values and UTC strings, possibly for use when adding
test cases.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants