diff options
Diffstat (limited to 'src/pkg/netchan/netchan_test.go')
-rw-r--r-- | src/pkg/netchan/netchan_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pkg/netchan/netchan_test.go b/src/pkg/netchan/netchan_test.go index fd4d8f780..8c0f9a6e4 100644 --- a/src/pkg/netchan/netchan_test.go +++ b/src/pkg/netchan/netchan_test.go @@ -178,6 +178,16 @@ func TestExportDrain(t *testing.T) { <-done } +// Not a great test but it does at least invoke Drain. +func TestImportDrain(t *testing.T) { + exp, imp := pair(t) + expDone := make(chan bool) + go exportReceive(exp, t, expDone) + <-expDone + importSend(imp, closeCount, t, nil) + imp.Drain(0) +} + // Not a great test but it does at least invoke Sync. func TestExportSync(t *testing.T) { exp, imp := pair(t) |