This test demonstrates how the message is preserved (or not) depending on how the barrier is constructed.
(t *testing.T)
| 46 | // This test demonstrates how the message is preserved (or not) depending |
| 47 | // on how the barrier is constructed. |
| 48 | func TestBarrierMessage(t *testing.T) { |
| 49 | tt := testutils.T{T: t} |
| 50 | |
| 51 | origErr := errors.New("hello") |
| 52 | |
| 53 | b1 := barriers.Handled(origErr) |
| 54 | tt.CheckEqual(b1.Error(), origErr.Error()) |
| 55 | |
| 56 | b2 := barriers.HandledWithMessage(origErr, "woo") |
| 57 | tt.CheckEqual(b2.Error(), "woo") |
| 58 | } |
| 59 | |
| 60 | // This test demonstrates that the original error details |
| 61 | // are preserved through barriers, even when they go through the network. |
nothing calls this directly
no test coverage detected
searching dependent graphs…