Skip to content

Commit e0e02e3

Browse files
besteadySergey ShadrinasmyasnikovCopilot
authored
Fix flacky test TestUnboundedChanContextTimeout (#1861)
* Fix flacky test TestUnboundedChanContextTimeout * Update CHANGELOG.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Sergey Shadrin <[email protected]> Co-authored-by: Aleksey Myasnikov <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 492a9d8 commit e0e02e3

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/devcontainers/go:1-1.21-bookworm
1+
FROM mcr.microsoft.com/devcontainers/go
22

33
# [Optional] Uncomment this section to install additional OS packages.
44
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

CHANGELOG.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Fix flaky unit test TestUnboundedChanContextTimeout
2+
13
## v3.115.7
24
* Added support for `PartitionBy` in `DescribeTable` results
35

@@ -23,7 +25,7 @@
2325
* Added public package `pkg/xtest` with test helpers
2426

2527
## v3.114.1
26-
* Fixed depth for `pkg/xerrors.WithStackTrace()` error
28+
* Fixed depth for `pkg/xerrors.WithStackTrace()` error
2729

2830
## v3.114.0
2931
* Added public packages:
@@ -83,7 +85,7 @@
8385
* Added read partitions in parallel for topic listener.
8486

8587
## v3.109.0
86-
* Added control plane fields for split-merge topics (Create,Alter,Describe)
88+
* Added control plane fields for split-merge topics (Create,Alter,Describe)
8789

8890
## v3.108.5
8991
* Fixed stop topic reader after TLI in transaction
@@ -128,7 +130,7 @@
128130
* Removed delay before send commit in sync mode of a topic reader
129131

130132
## v3.105.2
131-
* Improved the `ydb.WithSessionPoolSessionUsageLimit` option for allow `time.Duration` as argument type for limit max session time to live since create time
133+
* Improved the `ydb.WithSessionPoolSessionUsageLimit` option for allow `time.Duration` as argument type for limit max session time to live since create time
132134

133135
## v3.105.1
134136
* Changed the gRPC DNS balancer policy to `round_robin` for internal `discovery/ListEndpoints` call (reverted v3.90.2 changes)
@@ -151,7 +153,7 @@
151153
* Fixed bug with session query latency metric collector
152154

153155
## v3.104.3
154-
* Changed argument types in `table.Client.ReadRows` to public types for compatibility with mock-generation
156+
* Changed argument types in `table.Client.ReadRows` to public types for compatibility with mock-generation
155157

156158
## v3.104.2
157159
* Added bindings options into `ydb.ParamsFromMap` for bind wide time types
@@ -170,10 +172,10 @@
170172
* Supported wide `Date32`, `Datetime64` and `Timestamp64` types
171173

172174
## v3.101.4
173-
* Switched internal type of result `ydb.Driver.Query()` from `*internal/query.Client` to `query.Client` interface
175+
* Switched internal type of result `ydb.Driver.Query()` from `*internal/query.Client` to `query.Client` interface
174176

175177
## v3.101.3
176-
* Added `query.TransactionActor` type alias to `query.TxActor` for compatibility with `table.Client` API's
178+
* Added `query.TransactionActor` type alias to `query.TxActor` for compatibility with `table.Client` API's
177179
* Removed comment `experimental` from `ydb.ParamsBuilder` and `ydb.ParamsFromMap`
178180
* Fixed panic on closing `internal/query/sessionCore.done` channel twice
179181
* Fixed hangup when try to send batch of messages with size more, then grpc limits from topic writer internals
@@ -211,7 +213,7 @@
211213
* Added virtualtimestamps field to cdc description
212214

213215
## v3.99.10
214-
* Returned legacy behaviour for interpret as `time.Time` YDB types `Date`, `Datetime` and `Timestamp`
216+
* Returned legacy behaviour for interpret as `time.Time` YDB types `Date`, `Datetime` and `Timestamp`
215217

216218
## v3.99.9
217219
* Fixed broken compatibility `database/sql` driver which worked on query engine (usnig `ydb.WithQueryService(true)` connector option):
@@ -231,7 +233,7 @@
231233

232234
## v3.99.5
233235
* Fixed error `Empty query text` using prepared statements and `ydb.WithExecuteDataQueryOverQueryClient(true)` option
234-
* Prepared statements always send query text on Execute call from now (previous behaviour - send query ID)
236+
* Prepared statements always send query text on Execute call from now (previous behaviour - send query ID)
235237
* Prevented create decoder instance until start read a message from topics
236238

237239
## v3.99.4
@@ -256,8 +258,8 @@
256258
- `github.com/golang-jwt/jwt/v4` from v4.4.1 to v4.5.0
257259

258260
## v3.99.0
259-
* Added `ydb.WithExecuteDataQueryOverQueryClient(bool)` option to execute data queries from table service
260-
client using query client API. Using this option you can execute queries from legacy table service client
261+
* Added `ydb.WithExecuteDataQueryOverQueryClient(bool)` option to execute data queries from table service
262+
client using query client API. Using this option you can execute queries from legacy table service client
261263
through `table.Session.Execute` using internal query client API without limitation of 1000 rows in response.
262264
Be careful: an OOM problem may happen because bigger result requires more memory
263265

@@ -271,7 +273,7 @@
271273
* Fixed broken metric `ydb_go_sdk_ydb_database_sql_conns`
272274

273275
## v3.96.1
274-
* Fixed drop session from pool unnecessary in query service
276+
* Fixed drop session from pool unnecessary in query service
275277

276278
## v3.96.0
277279
* Supported of list, set and struct for unmarshall using `sugar.Unmarshall...`
@@ -287,14 +289,14 @@
287289
* Fixed an error in logging session deletion events
288290

289291
## v3.95.3
290-
* Supported of `database/sql/driver.Valuer` interfaces for params which passed to query using sql driver
292+
* Supported of `database/sql/driver.Valuer` interfaces for params which passed to query using sql driver
291293
* Exposed `credentials/credentials.OAuth2Config` OAuth2 config
292294

293295
## v3.95.2
294296
* Fixed panic on multiple closing driver
295297

296298
## v3.95.1
297-
* Added alias from `ydb.WithFakeTx(ydb.ScriptingQueryMode)` to `ydb.WithFakeTx(ydb.QueryExecuteQueryMode)` for compatibility with legacy code
299+
* Added alias from `ydb.WithFakeTx(ydb.ScriptingQueryMode)` to `ydb.WithFakeTx(ydb.QueryExecuteQueryMode)` for compatibility with legacy code
298300

299301
## v3.95.0
300302
* Added implementation of `database/sql` driver over query service client
@@ -310,7 +312,7 @@
310312

311313
## v3.93.2
312314
* Removed experimental helper `ydb.MustParamsFromMap`
313-
* Changed result of experimental helper `ydb.ParamsFromMap` from tuple <`params.Parameters`, `error`> to `params.Parameters` only
315+
* Changed result of experimental helper `ydb.ParamsFromMap` from tuple <`params.Parameters`, `error`> to `params.Parameters` only
314316

315317
## v3.93.1
316318
* Published `query.ExecuteOption` as alias to `internal/query/options.Execute`
@@ -338,7 +340,7 @@
338340
## v3.92.1
339341
* Added `sugar.WithUserPassword(user,password)` option for `sugar.DSN()` helper
340342
* Added `sugar.WithSecure(bool)` option for `sugar.DSN()` helper
341-
* Small breaking change: `sugar.DSN` have only two required parameters (endpoint and database) from now on.
343+
* Small breaking change: `sugar.DSN` have only two required parameters (endpoint and database) from now on.
342344
Third parameter `secure` must be passed as option `sugar.WithSecure(bool)`
343345

344346
## v3.92.0
@@ -353,14 +355,14 @@
353355
* Set the `pick_first` balancer for short-lived grpc connection inside ydb cluster discovery attempt
354356

355357
## v3.90.1
356-
* Small broken change: added method `ID()` into `spans.Span` interface (need to implement in adapter)
358+
* Small broken change: added method `ID()` into `spans.Span` interface (need to implement in adapter)
357359
* Fixed traceparent header for tracing grpc requests
358360

359361
## v3.90.0
360362
* Fixed closing of child driver with shared balancer
361363

362364
## v3.89.6
363-
* Refactored `database/sql` driver internals for query-service client support in the future
365+
* Refactored `database/sql` driver internals for query-service client support in the future
364366

365367
## v3.89.5
366368
* Fixed nil pointer dereference in metabalancer initialization

internal/xsync/unbounded_chan_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ func TestUnboundedChanContextCancellation(t *testing.T) {
180180
func TestUnboundedChanContextTimeout(t *testing.T) {
181181
ch := NewUnboundedChan[int]()
182182

183+
start := time.Now()
183184
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond)
184185
defer cancel()
185186

186187
// Should return context.DeadlineExceeded error after timeout
187-
start := time.Now()
188188
_, ok, err := ch.Receive(ctx)
189189
if !errors.Is(err, context.DeadlineExceeded) || ok {
190190
t.Errorf("Expected context.DeadlineExceeded error and ok=false, got ok=%v, err=%v", ok, err)

0 commit comments

Comments
 (0)