mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	give gitea time to calculate language stats (#11812)
This commit is contained in:
		@@ -8,6 +8,7 @@ import (
 | 
				
			|||||||
	"net/http"
 | 
						"net/http"
 | 
				
			||||||
	"net/url"
 | 
						"net/url"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/stretchr/testify/assert"
 | 
						"github.com/stretchr/testify/assert"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -34,6 +35,9 @@ func TestRepoLanguages(t *testing.T) {
 | 
				
			|||||||
		})
 | 
							})
 | 
				
			||||||
		session.MakeRequest(t, req, http.StatusFound)
 | 
							session.MakeRequest(t, req, http.StatusFound)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// let gitea calculate language stats
 | 
				
			||||||
 | 
							time.Sleep(time.Second)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Save new file to master branch
 | 
							// Save new file to master branch
 | 
				
			||||||
		req = NewRequest(t, "GET", "/api/v1/repos/user2/repo1/languages")
 | 
							req = NewRequest(t, "GET", "/api/v1/repos/user2/repo1/languages")
 | 
				
			||||||
		resp = session.MakeRequest(t, req, http.StatusOK)
 | 
							resp = session.MakeRequest(t, req, http.StatusOK)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user