@@ -556,6 +556,38 @@ var _ = Describe("ClusterClient", func() {
556
556
AfterEach (func () {})
557
557
558
558
assertPipeline ()
559
+
560
+ It ("doesn't fail node with context.Canceled error" , func () {
561
+ ctx , cancel := context .WithCancel (context .Background ())
562
+ cancel ()
563
+ pipe .Set (ctx , "A" , "A_value" , 0 )
564
+ cmds , err := pipe .Exec (ctx )
565
+ Expect (cmds ).To (HaveLen (1 ))
566
+ Expect (err ).To (Equal (context .Canceled ))
567
+
568
+ clientNodes , _ := client .Nodes (ctx , "A" )
569
+
570
+ for _ , node := range clientNodes {
571
+ Expect (node .Failing ()).To (BeFalse ())
572
+ }
573
+ })
574
+
575
+ It ("doesn't fail node with context.DeadlineExceeded error" , func () {
576
+ ctx , cancel := context .WithTimeout (context .Background (), 1 * time .Nanosecond )
577
+ defer cancel ()
578
+
579
+ pipe .Set (ctx , "A" , "A_value" , 0 )
580
+ _ , err := pipe .Exec (ctx )
581
+
582
+ Expect (err ).To (HaveOccurred ())
583
+ Expect (errors .Is (err , context .DeadlineExceeded )).To (BeTrue ())
584
+
585
+ clientNodes , _ := client .Nodes (ctx , "A" )
586
+
587
+ for _ , node := range clientNodes {
588
+ Expect (node .Failing ()).To (BeFalse ())
589
+ }
590
+ })
559
591
})
560
592
561
593
Describe ("with TxPipeline" , func () {
0 commit comments