Skip to content

Commit

Permalink
require: finish package uacp
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed Dec 16, 2024
1 parent 91eb60e commit 07c3dd5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions uacp/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ func TestConn(t *testing.T) {
t.Run("server exists ", func(t *testing.T) {
ep := "opc.tcp://127.0.0.1:4840/foo/bar"
ln, err := Listen(ep, nil)
if err != nil {
t.Fatal(err)
}
require.NoError(t, err)
defer ln.Close()

ctx, cancel := context.WithCancel(context.Background())
Expand All @@ -45,9 +43,9 @@ func TestConn(t *testing.T) {
select {
case <-done:
case err := <-acceptErr:
t.Fatalf("accept fail: %v", err)
require.Fail(t, "accept fail: %v", err)
case <-time.After(time.Second):
t.Fatal("timed out")
require.Fail(t, "timed out")
}
})

Expand Down

0 comments on commit 07c3dd5

Please sign in to comment.