From 3406791839716978cf68cb1499c4e302581447a7 Mon Sep 17 00:00:00 2001 From: ain ghazal Date: Wed, 7 Feb 2024 11:56:52 +0100 Subject: [PATCH] update diagrams in tests --- internal/reliabletransport/reliable_ack_test.go | 11 +++++++++++ internal/reliabletransport/reliable_loss_test.go | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/internal/reliabletransport/reliable_ack_test.go b/internal/reliabletransport/reliable_ack_test.go index fe48048b..6ebbd08f 100644 --- a/internal/reliabletransport/reliable_ack_test.go +++ b/internal/reliabletransport/reliable_ack_test.go @@ -11,6 +11,17 @@ import ( ) // test that everything that is received from below is eventually ACKed to the sender. +/* + + ┌────┐id ┌────┐ + │sndr│◄──┤rcvr│ + └─┬──┘ └──▲─┘ + │ │ + │ │ + │ │ + ▼ send + ack +*/ func TestReliable_ACK(t *testing.T) { log.SetLevel(log.DebugLevel) diff --git a/internal/reliabletransport/reliable_loss_test.go b/internal/reliabletransport/reliable_loss_test.go index f3ab09ed..dc0c4b38 100644 --- a/internal/reliabletransport/reliable_loss_test.go +++ b/internal/reliabletransport/reliable_loss_test.go @@ -11,8 +11,9 @@ import ( // test that everything that is sent eventually arrives in bounded time, in the pressence of losses. /* - | - v + │ + │ + ▼ ┌────┐ack┌────┐ │sndr│◄──┤rcvr│ └─┬──┘ └──▲─┘ @@ -20,7 +21,6 @@ import ( drop◄─┤ │ │ │ ▼relay (ack) - */ func TestReliable_WithLoss(t *testing.T) {