@@ -92,7 +92,7 @@ func TestFreezeUnfreeze(t *testing.T) {
9292 // now, pop off four tasks, there should be one from each
9393 matchNTasks (t , ptq , 4 , a .Pretty (), b .Pretty (), c .Pretty (), d .Pretty ())
9494
95- ptq .Remove (peertask. Task { Identifier : "1" } , b )
95+ ptq .Remove ("1" , b )
9696
9797 // b should be frozen, causing it to get skipped in the rotation
9898 matchNTasks (t , ptq , 3 , a .Pretty (), c .Pretty (), d .Pretty ())
@@ -101,6 +101,12 @@ func TestFreezeUnfreeze(t *testing.T) {
101101
102102 matchNTasks (t , ptq , 1 , b .Pretty ())
103103
104+ // remove none existent task
105+ ptq .Remove ("-1" , b )
106+
107+ // b should not be frozen
108+ matchNTasks (t , ptq , 4 , a .Pretty (), b .Pretty (), c .Pretty (), d .Pretty ())
109+
104110}
105111
106112func TestFreezeUnfreezeNoFreezingOption (t * testing.T ) {
@@ -124,7 +130,7 @@ func TestFreezeUnfreezeNoFreezingOption(t *testing.T) {
124130 // now, pop off four tasks, there should be one from each
125131 matchNTasks (t , ptq , 4 , a .Pretty (), b .Pretty (), c .Pretty (), d .Pretty ())
126132
127- ptq .Remove (peertask. Task { Identifier : "1" } , b )
133+ ptq .Remove ("1" , b )
128134
129135 // b should be frozen, causing it to get skipped in the rotation
130136 matchNTasks (t , ptq , 4 , a .Pretty (), b .Pretty (), c .Pretty (), d .Pretty ())
0 commit comments