@@ -73,7 +73,7 @@ func TestRepoMergeUpstream(t *testing.T) {
73
73
}
74
74
respMsg , _ := htmlDoc .Find (".ui.message:not(.positive)" ).Html ()
75
75
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 )
77
77
78
78
// click the "sync fork" button
79
79
req = NewRequestWithValues (t , "POST" , mergeUpstreamLink , map [string ]string {"_csrf" : GetUserCSRFToken (t , session )})
@@ -88,9 +88,7 @@ func TestRepoMergeUpstream(t *testing.T) {
88
88
req := NewRequestWithJSON (t , "PUT" , fmt .Sprintf ("/api/v1/repos/%s/%s/contents/%s" , baseRepo .OwnerName , baseRepo .Name , "new-file.txt" ), & api.UpdateFileOptions {
89
89
DeleteFileOptions : api.DeleteFileOptions {
90
90
FileOptions : api.FileOptions {
91
- BranchName : "master" ,
92
- NewBranchName : "master" ,
93
- Message : "Update new-file.txt" ,
91
+ Message : "Update new-file.txt" ,
94
92
},
95
93
SHA : "a4007b6679563f949751ed31bb371fdfb3194446" ,
96
94
},
@@ -105,7 +103,7 @@ func TestRepoMergeUpstream(t *testing.T) {
105
103
htmlDoc := NewHTMLParser (t , resp .Body )
106
104
respMsg , _ := htmlDoc .Find (".ui.message:not(.positive)" ).Html ()
107
105
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 )
109
107
110
108
// and do the merge-upstream by API
111
109
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) {
123
121
resp := session .MakeRequest (t , NewRequestf (t , "GET" , "/%s/test-repo-fork/src/branch/fork-branch" , forkUser .Name ), http .StatusOK )
124
122
htmlDoc := NewHTMLParser (t , resp .Body )
125
123
return queryMergeUpstreamButtonLink (htmlDoc ) == ""
126
- }, 5 * time .Second , 100 * time .Millisecond )
124
+ }, 10 * time .Second , 200 * time .Millisecond )
127
125
})
128
126
})
129
127
}
0 commit comments