Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Issue 2663103003: Fixing Intermittent SecurityKey Unittest Failures (Closed)

Created:
3 years, 10 months ago by joedow
Modified:
3 years, 10 months ago
Reviewers:
Sergey Ulanov, nicholss
CC:
chromium-reviews, chromoting-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixing Intermittent SecurityKey Unittest Failures This issue was introduced with the move from IPC to Mojo. The problem occurs when tests requiring IPC Support run back to back, running them individually is fine. In the error scenario, the IPC Server class fails to create a Mojo channel. This appears to be a result of initializing a new IPC Support object before every test is executed and cleaning it up afterwards. The cleanup is asynchronous and can cause problems with the subsequent test run. My solution is to initialize the IPC Support object before the call to execute tests, that way the setup and cleanup only occurs once per test suite run and we don't hit these race conditions. This looks like a common pattern in other unit tests in Chromium. BUG=686922 Review-Url: https://codereview.chromium.org/2663103003 Cr-Commit-Position: refs/heads/master@{#448650} Committed: https://chromium.googlesource.com/chromium/src/+/a7c4f961c4f1e8724dc7cb05552aa30b2c58fa9a

Patch Set 1 #

Patch Set 2 : Fix windows unittests #

Patch Set 3 : Fixing some threading issues in the current unit tests. #

Total comments: 6

Patch Set 4 : Addressing CR Feedback #

Patch Set 5 : Addressing more feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -25 lines) Patch
M remoting/base/run_all_unittests.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M remoting/host/security_key/fake_security_key_ipc_client.h View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M remoting/host/security_key/fake_security_key_ipc_client.cc View 1 2 1 chunk +6 lines, -1 line 0 comments Download
M remoting/host/security_key/security_key_auth_handler_win_unittest.cc View 1 2 3 4 5 chunks +11 lines, -7 lines 0 comments Download
M remoting/host/security_key/security_key_ipc_client_unittest.cc View 1 2 3 6 chunks +11 lines, -6 lines 0 comments Download
M remoting/host/security_key/security_key_ipc_server_unittest.cc View 1 2 3 4 8 chunks +20 lines, -11 lines 0 comments Download

Messages

Total messages: 35 (26 generated)
joedow
PTAL!
3 years, 10 months ago (2017-02-01 22:44:10 UTC) #14
nicholss
lgtm
3 years, 10 months ago (2017-02-01 23:00:36 UTC) #16
Sergey Ulanov
https://codereview.chromium.org/2663103003/diff/40001/remoting/host/security_key/security_key_ipc_server_unittest.cc File remoting/host/security_key/security_key_ipc_server_unittest.cc (right): https://codereview.chromium.org/2663103003/diff/40001/remoting/host/security_key/security_key_ipc_server_unittest.cc#newcode112 remoting/host/security_key/security_key_ipc_server_unittest.cc:112: void SecurityKeyIpcServerTest::WaitForPendingOperations() { Maybe call this RunPendingTasks()? This function ...
3 years, 10 months ago (2017-02-02 01:46:40 UTC) #17
joedow
Addressed feedback, PTAL! https://codereview.chromium.org/2663103003/diff/40001/remoting/host/security_key/security_key_ipc_server_unittest.cc File remoting/host/security_key/security_key_ipc_server_unittest.cc (right): https://codereview.chromium.org/2663103003/diff/40001/remoting/host/security_key/security_key_ipc_server_unittest.cc#newcode112 remoting/host/security_key/security_key_ipc_server_unittest.cc:112: void SecurityKeyIpcServerTest::WaitForPendingOperations() { On 2017/02/02 01:46:40, ...
3 years, 10 months ago (2017-02-03 22:32:46 UTC) #22
Sergey Ulanov
3 years, 10 months ago (2017-02-06 17:26:08 UTC) #23
Sergey Ulanov
lgtm, but please see my comment in the previous message
3 years, 10 months ago (2017-02-06 17:26:58 UTC) #24
joedow
I added a TearDown method which drains the current RunLoop (based on Sergey's previous comments) ...
3 years, 10 months ago (2017-02-07 17:09:20 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2663103003/80001
3 years, 10 months ago (2017-02-07 17:09:47 UTC) #32
commit-bot: I haz the power
3 years, 10 months ago (2017-02-07 17:13:59 UTC) #35
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/a7c4f961c4f1e8724dc7cb05552a...

Powered by Google App Engine
This is Rietveld 408576698