fix: TestSleepStrict

This commit is contained in:
lilong.129
2023-08-24 21:18:01 +08:00
parent 02a2d800e5
commit be87a2cdcc
3 changed files with 17 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# Release History # Release History
## v4.3.6 (2023-08-22) ## v4.3.6 (2023-08-24)
**go version** **go version**
+2 -2
View File
@@ -40,7 +40,7 @@ func TestSleepStrict(t *testing.T) {
sleepStrict(startTime, 1230) sleepStrict(startTime, 1230)
dur := time.Since(startTime).Milliseconds() dur := time.Since(startTime).Milliseconds()
t.Log(dur) t.Log(dur)
if dur < 1230 || dur > 1232 { if dur <= 1230 || dur > 1232 {
t.Fatal("sleepRandom failed") t.Fatalf("sleepRandom failed, dur: %d", dur)
} }
} }
+14 -4
View File
@@ -53,10 +53,20 @@ func (o OCRResults) ToOCRTexts() (ocrTexts OCRTexts) {
} }
type ImageResult struct { type ImageResult struct {
URL string `json:"url"` // image uploaded url URL string `json:"url"` // image uploaded url
OCRResult OCRResults `json:"ocrResult"` // OCR texts OCRResult OCRResults `json:"ocrResult"` // OCR texts
LiveType string `json:"liveType"` // 直播间类型 // NoLive(非直播间
UIResult UIResultMap `json:"uiResult"` // 图标检测 // Shop(电商)
// LifeService(生活服务)
// Show(秀场)
// Game(游戏)
// People(多人)
// PKPK
// Media(媒体)
// Chat(语音)
// Event(赛事)
LiveType string `json:"liveType"` // 直播间类型
UIResult UIResultMap `json:"uiResult"` // 图标检测
} }
type APIResponseImage struct { type APIResponseImage struct {