From 5c1a69cf218f5a9b1337230b7019845b641e4456 Mon Sep 17 00:00:00 2001 From: Prateek Kumar Date: Fri, 10 Jan 2025 14:01:11 -0800 Subject: [PATCH] Go: XTrim, XLen - fix formatting Signed-off-by: Prateek Kumar --- go/integTest/shared_commands_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/go/integTest/shared_commands_test.go b/go/integTest/shared_commands_test.go index 34d2f5b4d9..e841e7f57a 100644 --- a/go/integTest/shared_commands_test.go +++ b/go/integTest/shared_commands_test.go @@ -4598,6 +4598,7 @@ func (suite *GlideTestSuite) Test_XAdd_XLen_XTrim() { ), ) assert.NotNil(t, xAddResult.Value()) + assert.Nil(t, err) id := xAddResult.Value() xLenResult, err = client.XLen(key1) assert.Nil(t, err) @@ -4611,6 +4612,7 @@ func (suite *GlideTestSuite) Test_XAdd_XLen_XTrim() { options.NewXTrimOptionsWithMinId(id).SetExactTrimming(), ), ) + assert.Nil(t, err) assert.NotNil(t, xAddResult.Value()) xLenResult, err = client.XLen(key1) assert.Nil(t, err) @@ -4621,6 +4623,7 @@ func (suite *GlideTestSuite) Test_XAdd_XLen_XTrim() { key1, options.NewXTrimOptionsWithMaxLen(1).SetExactTrimming(), ) + assert.Nil(t, err) assert.Equal(t, xTrimResult.Value(), int64(1)) xLenResult, err = client.XLen(key1) assert.Nil(t, err) @@ -4631,6 +4634,7 @@ func (suite *GlideTestSuite) Test_XAdd_XLen_XTrim() { key2, options.NewXTrimOptionsWithMaxLen(1).SetExactTrimming(), ) + assert.Nil(t, err) assert.Equal(t, xTrimResult.Value(), int64(0)) xLenResult, err = client.XLen(key2) assert.Nil(t, err) @@ -4638,11 +4642,11 @@ func (suite *GlideTestSuite) Test_XAdd_XLen_XTrim() { // Throw Exception: Key exists - but it is not a stream setResult, err := client.Set(key2, "xtrimtest") + assert.Nil(t, err) assert.Equal(t, setResult.Value(), "OK") _, err = client.XTrim(key2, options.NewXTrimOptionsWithMinId("0-1")) assert.NotNil(t, err) assert.IsType(t, &api.RequestError{}, err) - _, err = client.XLen(key2) assert.NotNil(t, err) assert.IsType(t, &api.RequestError{}, err)