Skip to content

Commit

Permalink
Fix test logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ksysoev committed May 19, 2024
1 parent f2e16c2 commit 7bc2645
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ var ErrServerAlreadyRunning = fmt.Errorf("server is already running")

type Server struct {
baseCtx context.Context
listener net.Listener
mutex *sync.Mutex
handler *http.Server
addr string
channels []wasabi.Channel
listener net.Listener
}

type Option func(*Server)
Expand Down
4 changes: 2 additions & 2 deletions server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package server

import (
"context"
"fmt"
"net/http"
"testing"
"time"
Expand Down Expand Up @@ -256,7 +255,8 @@ func TestServer_Addr(t *testing.T) {
t.Error("Expected server to start")
}

fmt.Println(server.listener)
// Wait for the server to fully start
time.Sleep(1 * time.Millisecond)

addr := server.Addr()

Expand Down

0 comments on commit 7bc2645

Please sign in to comment.