still trying to fix race condition

This commit is contained in:
Neale Pickett 2022-05-10 19:11:47 -06:00
parent d014384b05
commit be74961e94
2 changed files with 5 additions and 2 deletions

View File

@ -4,7 +4,7 @@ stages:
test:
stage: test
image: golang:1.17
image: golang:1.18
only:
refs:
- main

View File

@ -33,7 +33,9 @@ func (hs *HTTPServer) TestRequest(path string, args map[string]string) *httptest
}
func TestHttpd(t *testing.T) {
hs := NewHTTPServer("/", NewTestServer())
server := NewTestServer()
hs := NewHTTPServer("/", server)
stateProvider := server.State.(*State)
if r := hs.TestRequest("/", nil); r.Result().StatusCode != 200 {
t.Error(r.Result())
@ -113,6 +115,7 @@ func TestHttpd(t *testing.T) {
}
time.Sleep(TestMaintenanceInterval)
stateProvider.refresh()
if r := hs.TestRequest("/content/pategory/2/puzzle.json", nil); r.Result().StatusCode != 200 {
t.Error(r.Result())