Skip to content

Commit 52d271d

Browse files
committed
ING-1399: Address PR comments
1 parent bcf0712 commit 52d271d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

gateway/test/dapi_graceful_shutdown_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"github.com/couchbase/stellar-gateway/testutils"
1919
"github.com/couchbase/stellar-gateway/utils/selfsignedcert"
2020
"github.com/stretchr/testify/assert"
21+
"github.com/stretchr/testify/require"
2122
"go.uber.org/zap"
2223
)
2324

@@ -142,15 +143,15 @@ func (s *GatewayOpsTestSuite) TestGracefulShutdown() {
142143
reqBody := bytes.NewReader(statement)
143144

144145
req, err := http.NewRequestWithContext(context.Background(), "POST", fmt.Sprintf("https://%s/_p/query/query/service", dapiAddr), reqBody)
145-
assert.NoError(s.T(), err, "failed to create request with client trace")
146+
require.NoError(s.T(), err, "failed to create request with client trace")
146147

147148
req.SetBasicAuth(testConfig.CbUser, testConfig.CbPass)
148149
req.Header.Set("Content-Type", "application/json")
149150

150151
slowReqSent <- struct{}{}
151152
_, err = dapiCli.Do(req)
152153

153-
// After the configured period shutdown will reuturn and we cancel the context. This triggers the go routine in Serve()
154+
// After the configured period shutdown will return and we cancel the context. This triggers the go routine in Serve()
154155
// that stops the http server forcibly, causing EOFs on existing connections doing work.
155156
assert.ErrorIs(s.T(), err, io.EOF)
156157
}()

0 commit comments

Comments
 (0)