@@ -42,6 +42,8 @@ var largeValue = map[string]string{
4242 "linkedList" : strings .Repeat ("hello" , 4 ),
4343}
4444
45+ const blockingTimeout = "0.2"
46+
4547func TestLTRIM (t * testing.T ) {
4648 configOptions := []util.ConfigOptions {
4749 {
@@ -485,7 +487,7 @@ func testList(t *testing.T, configs util.KvrocksServerConfigs) {
485487 rd := srv .NewTCPClient ()
486488 defer func () { require .NoError (t , rd .Close ()) }()
487489 require .NoError (t , rdb .Del (ctx , "blist1" , "blist2" ).Err ())
488- require .NoError (t , rd .WriteArgs (popType , "blist1" , "blist2" , "1" ))
490+ require .NoError (t , rd .WriteArgs (popType , "blist1" , "blist2" , blockingTimeout ))
489491 rd .MustMatch (t , "" )
490492 })
491493
@@ -1491,7 +1493,7 @@ func testList(t *testing.T, configs util.KvrocksServerConfigs) {
14911493 rd := srv .NewTCPClient ()
14921494 defer func () { require .NoError (t , rd .Close ()) }()
14931495 require .NoError (t , rdb .Del (ctx , key1 , key2 ).Err ())
1494- require .NoError (t , rd .WriteArgs ("blmpop" , "1" , "2" , key1 , key2 , direction ))
1496+ require .NoError (t , rd .WriteArgs ("blmpop" , blockingTimeout , "2" , key1 , key2 , direction ))
14951497 rd .MustMatch (t , "" )
14961498 })
14971499
0 commit comments