fix: TestSleepStrict

This commit is contained in:
lilong.129
2023-08-24 21:16:45 +08:00
parent 02a2d800e5
commit be87a2cdcc
3 changed files with 17 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
# Release History
## v4.3.6 (2023-08-22)
## v4.3.6 (2023-08-24)
**go version**

View File

@@ -40,7 +40,7 @@ func TestSleepStrict(t *testing.T) {
sleepStrict(startTime, 1230)
dur := time.Since(startTime).Milliseconds()
t.Log(dur)
if dur < 1230 || dur > 1232 {
t.Fatal("sleepRandom failed")
if dur <= 1230 || dur > 1232 {
t.Fatalf("sleepRandom failed, dur: %d", dur)
}
}

View File

@@ -53,10 +53,20 @@ func (o OCRResults) ToOCRTexts() (ocrTexts OCRTexts) {
}
type ImageResult struct {
URL string `json:"url"` // image uploaded url
OCRResult OCRResults `json:"ocrResult"` // OCR texts
LiveType string `json:"liveType"` // 直播间类型
UIResult UIResultMap `json:"uiResult"` // 图标检测
URL string `json:"url"` // image uploaded url
OCRResult OCRResults `json:"ocrResult"` // OCR texts
// NoLive直播间
// Shop电商
// LifeService生活服务
// Show秀场
// Game游戏
// People多人
// PKPK
// Media媒体
// Chat语音
// Event赛事
LiveType string `json:"liveType"` // 直播间类型
UIResult UIResultMap `json:"uiResult"` // 图标检测
}
type APIResponseImage struct {