nicer debugging output for a few packet types
diff --git a/packet-manager_test.go b/packet-manager_test.go
index 08df054..7e187d9 100644
--- a/packet-manager_test.go
+++ b/packet-manager_test.go
@@ -2,6 +2,7 @@
import (
"encoding"
+ "fmt"
"sync"
"testing"
"time"
@@ -89,6 +90,19 @@
s.close()
}
+func (p sshFxpRemovePacket) String() string {
+ return fmt.Sprintf("RmPct:%d", p.ID)
+}
+func (p sshFxpOpenPacket) String() string {
+ return fmt.Sprintf("OpPct:%d", p.ID)
+}
+func (p sshFxpWritePacket) String() string {
+ return fmt.Sprintf("WrPct:%d", p.ID)
+}
+func (p sshFxpClosePacket) String() string {
+ return fmt.Sprintf("ClPct:%d", p.ID)
+}
+
// Test what happens when the pool processes a close packet on a file that it
// is still reading from.
func TestCloseOutOfOrder(t *testing.T) {