From 30a86a0d8783c5e48f81c9197bf64c2425dd1150 Mon Sep 17 00:00:00 2001 From: Mike <45373284+munkhuushmgl@users.noreply.github.com> Date: Thu, 22 Oct 2020 13:10:19 -0700 Subject: [PATCH] chore: fixes the flaky tests (#486) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #483 #479 #480 🦕 --- .../system-test/analyze-streaming-shot-change.test.js | 3 ++- video-intelligence/system-test/analyze_face_detection.test.js | 2 +- .../system-test/analyze_face_detection_gcs.test.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/video-intelligence/system-test/analyze-streaming-shot-change.test.js b/video-intelligence/system-test/analyze-streaming-shot-change.test.js index 1b81a9e95f..532523c3e8 100644 --- a/video-intelligence/system-test/analyze-streaming-shot-change.test.js +++ b/video-intelligence/system-test/analyze-streaming-shot-change.test.js @@ -23,7 +23,8 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cmd = 'node analyze-streaming-shot-change.js'; const file = 'resources/googlework_short.mp4'; -describe('streaming shot change', () => { +describe('streaming shot change', function () { + this.retries(3); it('should analyze shot changes in a streaming video', async () => { const output = execSync(`${cmd} ${file}`); assert.match(output, /The entire video is one shot./); diff --git a/video-intelligence/system-test/analyze_face_detection.test.js b/video-intelligence/system-test/analyze_face_detection.test.js index 257562bdc5..3f39a17df6 100644 --- a/video-intelligence/system-test/analyze_face_detection.test.js +++ b/video-intelligence/system-test/analyze_face_detection.test.js @@ -26,6 +26,6 @@ const file = 'resources/googlework_short.mp4'; describe('analyzing faces in video', () => { it('should identify faces in a local file', async () => { const output = execSync(`${cmd} ${file}`); - assert.match(output, /Attribute/); + assert.match(output, /Face detected:/); }); }); diff --git a/video-intelligence/system-test/analyze_face_detection_gcs.test.js b/video-intelligence/system-test/analyze_face_detection_gcs.test.js index e5ef77b045..8f970d8a68 100644 --- a/video-intelligence/system-test/analyze_face_detection_gcs.test.js +++ b/video-intelligence/system-test/analyze_face_detection_gcs.test.js @@ -26,6 +26,6 @@ const gcsUri = 'gs://cloud-samples-data/video/googlework_short.mp4'; describe('analyzing faces in video', () => { it('should identify faces in a file in Google Storage', async () => { const output = execSync(`${cmd} ${gcsUri}`); - assert.match(output, /Attribute/); + assert.match(output, /Face detected:/); }); });