mirror of https://github.com/tikv/client-go.git
test: restore skipped test for pipelined dml (#1238)
* test: restore skipped test Signed-off-by: ekexium <eke@fastmail.com> * test: FlushWait() to avoid race Signed-off-by: ekexium <eke@fastmail.com> --------- Signed-off-by: ekexium <eke@fastmail.com>
This commit is contained in:
parent
c9767e5558
commit
58ef395164
|
|
@ -353,11 +353,10 @@ func (s *testPipelinedMemDBSuite) TestPipelinedPrefetch() {
|
|||
s.Nil(txn.GetMemBuffer().FlushWait())
|
||||
m, err = txn.BatchGet(context.Background(), [][]byte{[]byte("99")})
|
||||
s.Nil(err)
|
||||
// restore this check after tikv return pairs for buffer batch get
|
||||
//s.Equal(m, map[string][]byte{})
|
||||
//v, err = panicWhenReadingRemoteBuffer([]byte("99"))
|
||||
//s.Nil(err)
|
||||
//s.Equal(v, []byte{})
|
||||
s.Equal(m, map[string][]byte{})
|
||||
v, err = panicWhenReadingRemoteBuffer([]byte("99"))
|
||||
s.Nil(err)
|
||||
s.Equal(v, []byte{})
|
||||
txn.Rollback()
|
||||
|
||||
// empty memdb should also cache the not exist result.
|
||||
|
|
|
|||
|
|
@ -323,6 +323,7 @@ func TestPipelinedAdjustFlushCondition(t *testing.T) {
|
|||
flushed, err = memdb.Flush(false)
|
||||
require.Nil(t, err)
|
||||
require.True(t, flushed)
|
||||
require.Nil(t, memdb.FlushWait())
|
||||
|
||||
// need 2 keys to flush
|
||||
require.Nil(t, failpoint.Enable("tikvclient/pipelinedMemDBMinFlushKeys", `return(2)`))
|
||||
|
|
@ -332,6 +333,7 @@ func TestPipelinedAdjustFlushCondition(t *testing.T) {
|
|||
flushed, err = memdb.Flush(false)
|
||||
require.Nil(t, err)
|
||||
require.False(t, flushed)
|
||||
require.Nil(t, memdb.FlushWait())
|
||||
|
||||
// need 2 keys to flush, but force threshold reached
|
||||
require.Nil(t, failpoint.Enable("tikvclient/pipelinedMemDBMinFlushKeys", `return(2)`))
|
||||
|
|
|
|||
Loading…
Reference in New Issue