Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

BatcherImplTest.testThrottlingBlocking still flaky #1615

Closed
chanseokoh opened this issue Jan 28, 2022 · 4 comments
Closed

BatcherImplTest.testThrottlingBlocking still flaky #1615

chanseokoh opened this issue Jan 28, 2022 · 4 comments
Assignees
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: process A process-related concern. May include testing, release, or the like.

Comments

@chanseokoh
Copy link
Contributor

chanseokoh commented Jan 28, 2022

The test is known to be flaky. So far, we did #1589 and #1600. (However, although it may just be me, I feel this became less flaky.)

Unfortunately, this failed again in #1613. The bright side of it is that we have a different error. Hopefully this reveals more information.

com.google.api.gax.batching.BatcherImplTest > testThrottlingBlocking FAILED
    org.mockito.exceptions.base.MockitoException: 
    No argument value was captured!
    You might have forgotten to use argument.capture() in verify()...
    ...or you used capture() in stubbing but stubbed method was not called.
    Be aware that it is recommended to use capture() only with verify()

    Examples of correct argument capturing:
        ArgumentCaptor<Person> argument = ArgumentCaptor.forClass(Person.class);
        verify(mock).doSomething(argument.capture());
        assertEquals("John", argument.getValue().getName());
        at com.google.api.gax.batching.BatcherImplTest.testThrottlingBlocking(BatcherImplTest.java:895)
@chanseokoh chanseokoh added the type: process A process-related concern. May include testing, release, or the like. label Jan 28, 2022
@meltsufin
Copy link
Member

I've noticed it flaking again too. I'm at a loss here. I welcome another pair of eyes on this to try to fix it once and for all.

@vam-google
Copy link
Contributor

Was the previous fix done by increasing timeout somethign from 10 ms to 50 ms? That could be just not enough difference. In many of our tests we use timeout as high as 20 sec, so maybe try just increasing it to something like 1sec. Or maybe this is the indicator of the logic itself having flaws. (btw, I've bee noticing flakiness myself too).

@vam-google vam-google added the priority: p3 Desirable enhancement or fix. May not be included in next release. label Jan 31, 2022
@meltsufin
Copy link
Member

It wasn't just the timeout. I thought the test was actually written is such a way that it wasn't testing what was intended. I thought I fixed it, but there still seems to be some kind indeterminism happening with the threads.

@meltsufin
Copy link
Member

Re-open if it's still flaky after #1775.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

No branches or pull requests

4 participants