Skip to content

Conversation

@copybara-service
Copy link
Contributor

Use toNanosSaturated in Queues.

While there, rename a parameter in a test helper method to match the production parameter name.

I admit that my new test is not necessarily the best of all possible tests: It detects the problem currently, but it wouldn't detect the problem if we were to change the prod code to decompose the Duration only when it actually needs to block. I kind of doubt we'd ever bother, though.

RELNOTES=n/a

While there, rename a parameter in a test helper method to match the production parameter name.

I admit that my new test is not necessarily the best of all possible tests: It detects the problem currently, but it wouldn't detect the problem if we were to change the prod code to decompose the `Duration` only [when it actually needs to block](https://github.com/google/guava/blob/e416f493d7f6790cae859aab1ddacb456469f614/guava/src/com/google/common/collect/Queues.java#L336). I kind of doubt we'd ever bother, though.

RELNOTES=n/a
PiperOrigin-RevId: 828005669
@copybara-service copybara-service bot merged commit 12878d7 into master Nov 4, 2025
@copybara-service copybara-service bot deleted the test_827487088 branch November 4, 2025 17:25
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.

1 participant