lib9p

Go 9P library.
Log | Files | Refs | LICENSE

commit 3e1f5fa69227a0154cc40bb035df30ecf13c0490
parent 3366a197eca7d51e38ee0e830c51f63c635fc2e3
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Mon, 30 Oct 2023 08:31:22 +0900

update test

Diffstat:
Mexport_test.go | 8++++++++
Mserver_test.go | 4++--
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/export_test.go b/export_test.go @@ -1,5 +1,7 @@ package lib9p +import "context" + var ( SrvVersion = sVersion RepVersion = rVersion @@ -64,6 +66,12 @@ type BufMsg = bufMsg func (s *Server) RPool() *ReqPool { return s.rPool } func (s *Server) FPool() *FidPool { return s.fPool } +func (s *Server) RunListener(ctx context.Context) { + s.runListener(ctx) +} +func (s *Server) RunSpeaker(ctx context.Context) { + s.runSpeaker(ctx) +} func (rp *ReqPool) Add(tag uint16) (*Req, error) { return rp.add(tag) } diff --git a/server_test.go b/server_test.go @@ -155,8 +155,8 @@ func TestServer(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() s := lib9p.NewServer(testfs.FS, 1024, sr, sw) - s.listenChan = s.runListener(ctx, s.r) - s.speakChan = s.runSpeaker(ctx, s.w) + s.RunListener(ctx) + s.RunSpeaker(ctx) for _, m := range msg { r, err := newReq(s, m) if err != nil {