Skip to content

Commit

Permalink
fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
jakecoffman committed Oct 25, 2023
1 parent b8df176 commit 032c516
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/server/input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"net/http"
"sync"
"testing"
"time"

"github.com/dependabot/cli/internal/model"
)
Expand All @@ -17,6 +18,8 @@ func TestInput(t *testing.T) {
input, _ = Input(8080)
wg.Done()
}()
// give the server time to start
time.Sleep(10 * time.Millisecond)

data := `{"job":{"package-manager":"test"},"credentials":[{"credential":"value"}]}`
resp, err := http.Post("http://localhost:8080", "application/json", bytes.NewReader([]byte(data)))
Expand Down

0 comments on commit 032c516

Please sign in to comment.