From 5734524378f9388b7a7466445b0b339e2837a5d8 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 9 Jun 2020 02:15:45 +0200 Subject: [PATCH] give gitea time to calculate language stats (#11812) --- integrations/api_repo_languages_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integrations/api_repo_languages_test.go b/integrations/api_repo_languages_test.go index ca92cd4f75..ea20e6d542 100644 --- a/integrations/api_repo_languages_test.go +++ b/integrations/api_repo_languages_test.go @@ -8,6 +8,7 @@ import ( "net/http" "net/url" "testing" + "time" "github.com/stretchr/testify/assert" ) @@ -34,6 +35,9 @@ func TestRepoLanguages(t *testing.T) { }) session.MakeRequest(t, req, http.StatusFound) + // let gitea calculate language stats + time.Sleep(time.Second) + // Save new file to master branch req = NewRequest(t, "GET", "/api/v1/repos/user2/repo1/languages") resp = session.MakeRequest(t, req, http.StatusOK)