运行后mvn jacoco:report如何在控制台上打印覆盖率?
我可以在浏览器中看到它,但希望它在 jenkins 中打印。
我收到很多类似下面提到的错误,
读取 tcp xx.xx.xx.xx:80:使用封闭的网络连接
读取 tcp xx.xx.xx.xx:80:连接被对等方重置
//HTTP连接函数
func GetResponseBytesByURL_raw(restUrl, connectionTimeOutStr, readTimeOutStr string) ([]byte, error) {
connectionTimeOut, _ /*err*/ := time.ParseDuration(connectionTimeOutStr)
readTimeOut, _ /*err*/ := time.ParseDuration(readTimeOutStr)
timeout := connectionTimeOut + readTimeOut // time.Duration((strconv.Atoi(connectionTimeOutStr) + strconv.Atoi(readTimeOutStr)))
//timeout = 200 * time.Millisecond
client := http.Client{
Timeout: timeout,
}
resp, err := client.Get(restUrl)
if nil != err {
logger.SetLog("Error GetResponseBytesByURL_raw |err: ", logs.LevelError, err)
return make([]byte, 0), err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
return body, err
}
Run Code Online (Sandbox Code Playgroud)
更新(7 月 …