*/tests: remove ineffectual assignment in tests (#24225)

This commit is contained in:
Shirly
2021-04-25 11:35:54 +08:00
committed by GitHub
parent 6344f7a02e
commit da5574a067
2 changed files with 4 additions and 5 deletions

View File

@ -206,7 +206,7 @@ func (s *testSnapshotFailSuite) TestRetryPointGetResolveTS(c *C) {
txn, err := s.store.Begin()
c.Assert(err, IsNil)
err = txn.Set([]byte("k1"), []byte("v1"))
c.Assert(txn.Set([]byte("k1"), []byte("v1")), IsNil)
err = txn.Set([]byte("k2"), []byte("v2"))
c.Assert(err, IsNil)
txn.SetOption(kv.EnableAsyncCommit, false)

View File

@ -65,9 +65,8 @@ func (s *testSuite) TestEncodeLargeSmallReuseBug(c *C) {
IsPKHandle: false,
},
}, nil)
m, err := bDecoder.DecodeToDatumMap(b, nil)
_, err = bDecoder.DecodeToDatumMap(b, nil)
c.Assert(err, IsNil)
v := m[largeColID]
colFt = types.NewFieldType(mysql.TypeLonglong)
smallColID := int64(1)
@ -81,9 +80,9 @@ func (s *testSuite) TestEncodeLargeSmallReuseBug(c *C) {
IsPKHandle: false,
},
}, nil)
m, err = bDecoder.DecodeToDatumMap(b, nil)
m, err := bDecoder.DecodeToDatumMap(b, nil)
c.Assert(err, IsNil)
v = m[smallColID]
v := m[smallColID]
c.Assert(v.GetInt64(), Equals, int64(2))
}