Commit b7ba60b
committed
pubsub: fix testModifyAckDeadline flaking, maybe
Previously MessageDispatcher starts off with deadline duration of 0.
Since we need to extend deadline before the time is up,
the client extends deadline a little before the deadline.
This translates to scheduling deadling extension "in the past".
In turn, this causes tasks to be run -- and new tasks scheduled --
without explicit calls to advance the time on the fake clock.
So, when the test code actually advance the fake clock,
it runs more tasks than it wants to.
This PR conservatively sets the initial deadline duration to 10 seconds.
This is already the default in streaming version.1 parent 00fbd72 commit b7ba60b
3 files changed
Lines changed: 3 additions & 2 deletions
File tree
- google-cloud-pubsub/src
- main/java/com/google/cloud/pubsub/spi/v1
- test/java/com/google/cloud/pubsub/spi/v1
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
0 commit comments