Skip to content

Commit fd45c52

Browse files
committed
update check timer for tests
1 parent b26c356 commit fd45c52

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/integration/repo_merge_upstream_test.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func TestRepoMergeUpstream(t *testing.T) {
7373
}
7474
respMsg, _ := htmlDoc.Find(".ui.message:not(.positive)").Html()
7575
return strings.Contains(respMsg, `This branch is 1 commit behind <a href="/user2/repo1/src/branch/master">user2/repo1:master</a>`)
76-
}, 5*time.Second, 100*time.Millisecond)
76+
}, 10*time.Second, 200*time.Millisecond)
7777

7878
// click the "sync fork" button
7979
req = NewRequestWithValues(t, "POST", mergeUpstreamLink, map[string]string{"_csrf": GetUserCSRFToken(t, session)})
@@ -88,9 +88,7 @@ func TestRepoMergeUpstream(t *testing.T) {
8888
req := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s", baseRepo.OwnerName, baseRepo.Name, "new-file.txt"), &api.UpdateFileOptions{
8989
DeleteFileOptions: api.DeleteFileOptions{
9090
FileOptions: api.FileOptions{
91-
BranchName: "master",
92-
NewBranchName: "master",
93-
Message: "Update new-file.txt",
91+
Message: "Update new-file.txt",
9492
},
9593
SHA: "a4007b6679563f949751ed31bb371fdfb3194446",
9694
},
@@ -105,7 +103,7 @@ func TestRepoMergeUpstream(t *testing.T) {
105103
htmlDoc := NewHTMLParser(t, resp.Body)
106104
respMsg, _ := htmlDoc.Find(".ui.message:not(.positive)").Html()
107105
return strings.Contains(respMsg, `The base branch <a href="/user2/repo1/src/branch/master">user2/repo1:master</a> has new changes`)
108-
}, 5*time.Second, 100*time.Millisecond)
106+
}, 10*time.Second, 200*time.Millisecond)
109107

110108
// and do the merge-upstream by API
111109
req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/test-repo-fork/merge-upstream", forkUser.Name), &api.MergeUpstreamRequest{
@@ -123,7 +121,7 @@ func TestRepoMergeUpstream(t *testing.T) {
123121
resp := session.MakeRequest(t, NewRequestf(t, "GET", "/%s/test-repo-fork/src/branch/fork-branch", forkUser.Name), http.StatusOK)
124122
htmlDoc := NewHTMLParser(t, resp.Body)
125123
return queryMergeUpstreamButtonLink(htmlDoc) == ""
126-
}, 5*time.Second, 100*time.Millisecond)
124+
}, 10*time.Second, 200*time.Millisecond)
127125
})
128126
})
129127
}

0 commit comments

Comments
 (0)