Skip to content

Commit aa1e391

Browse files
committed
ignore test shutdown if no urls for shutdown sessions
1 parent e553617 commit aa1e391

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 3.8.7
2+
* Ignored session shutdown test if no defined `YDB_SHUTDOWN_URLS` environment variable
3+
14
## 3.8.6
25
* Added `ydb.WithInsecure()` option
36

internal/meta/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package meta
22

33
const (
4-
Version = "ydb-go-sdk/3.8.6"
4+
Version = "ydb-go-sdk/3.8.7"
55
)

test/table_test.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -606,16 +606,19 @@ func TestTable(t *testing.T) {
606606
})
607607
})
608608
t.Run("SessionsShutdown", func(t *testing.T) {
609-
for _, url := range strings.Split(os.Getenv("YDB_SHUTDOWN_URLS"), ",") {
609+
urls := strings.Split(os.Getenv("YDB_SHUTDOWN_URLS"), ",")
610+
for _, url := range urls {
610611
// nolint:gosec
611612
_, err := http.Get(url)
612613
if err != nil {
613614
t.Fatalf("failed to send request: %v", err)
614615
}
615616
}
616-
shutdownedMtx.Lock()
617-
defer shutdownedMtx.Unlock()
618-
shutdowned = true
617+
if len(urls) > 0 {
618+
shutdownedMtx.Lock()
619+
defer shutdownedMtx.Unlock()
620+
shutdowned = true
621+
}
619622
})
620623
t.Run("SelectConcurrently", func(t *testing.T) {
621624
wg := sync.WaitGroup{}

0 commit comments

Comments
 (0)