Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some flaky tests in CI #12153

Merged
merged 7 commits into from Mar 7, 2018

Conversation

Projects
None yet
3 participants
@zcbenz
Copy link
Member

zcbenz commented Mar 7, 2018

No description provided.

zcbenz added some commits Mar 6, 2018

Guard whole InitPrefs with ScopedAllowIO
Saw a crash:
0 0x7f8d2f7d918d base::debug::StackTrace::StackTrace()
1 0x7f8d2f7d755c base::debug::StackTrace::StackTrace()
2 0x7f8d2f867caa logging::LogMessage::~LogMessage()
3 0x7f8d2fa157c7 base::ThreadRestrictions::AssertIOAllowed()
4 0x7f8d2f83453a base::OpenFile()
5 0x7f8d2f82a967 base::ReadFileToStringWithMaxSize()
6 0x7f8d2f82ad44 base::ReadFileToString()
7 0x7f8d2f846f73 JSONFileValueDeserializer::ReadFileToString()
8 0x7f8d2f84738c JSONFileValueDeserializer::Deserialize()
9 0x7f8d35a5d1f6 <unknown>
10 0x7f8d35a5c217 JsonPrefStore::ReadPrefs()
11 0x7f8d35a87d3e PrefService::InitFromStorage()
12 0x7f8d35a87c60 PrefService::PrefService()
13 0x7f8d35a91a10 PrefServiceFactory::Create()
14 0x000000e86e1b brightray::BrowserContext::InitPrefs()
15 0x000000c2bd64 atom::AtomBrowserContext::AtomBrowserContext()
16 0x000000c320db atom::AtomBrowserContext::From()
17 0x000000b4b8b5 atom::api::Session::FromPartition()
Fix done being called twice in setInterval test
The callback passed to browser process is called asyncly, so it is
possible that multiple callbacks has already been scheduled before we
can clearInternval.
Fix failing test when dir name has special chars
The pdfSource is not escaped while parsedURL.search is.

@zcbenz zcbenz requested a review from as a code owner Mar 7, 2018

Fix crash caused by not removing input observer
Solve crash:
0 libcontent.dylib content::RenderWidgetHostImpl::DispatchInputEventWithLatencyInfo(blink::WebInputEvent const&, ui::LatencyInfo*) + 214
1 libcontent.dylib content::RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 1350
2 libcontent.dylib content::RenderWidgetHostViewMac::ProcessMouseEvent(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 44
3 libcontent.dylib content::RenderWidgetHostInputEventRouter::RouteMouseEvent(content::RenderWidgetHostViewBase*, blink::WebMouseEvent*, ui::LatencyInfo const&) + 1817
@zcbenz

This comment has been minimized.

Copy link
Member Author

zcbenz commented Mar 7, 2018

Still have a few unresolved flaky tests:

not ok 713 chromium feature navigator.serviceWorker should register for file scheme
  Error: done() invoked with non-Error: unexpected error : [object Object]
      at w.webContents.on (/Users/electron/workspace/ctron_org_electron_PR-12151-2UDWGNWWM2XMSBOKHSIUX2AQ6T3VGZSKZQ5W422SUY4UU57HK7JQ/spec/chromium-spec.js:123:11)
      at CallbacksRegistry.apply (/Users/electron/workspace/ctron_org_electron_PR-12151-2UDWGNWWM2XMSBOKHSIUX2AQ6T3VGZSKZQ5W422SUY4UU57HK7JQ/out/D/Electron.app/Contents/Resources/electron.asar/common/api/callbacks-registry.js:46:25)
      at EventEmitter.ipcRenderer.on (/Users/electron/workspace/ctron_org_electron_PR-12151-2UDWGNWWM2XMSBOKHSIUX2AQ6T3VGZSKZQ5W422SUY4UU57HK7JQ/out/D/Electron.app/Contents/Resources/electron.asar/renderer/api/remote.js:261:21)
      at emitThree (events.js:135:13)
      at EventEmitter.emit (events.js:216:7)

Not sure of the cause, I have added code to make error more explicit.

script returned exit code 245

This is caused by Electron crashing in the main process, needs to get the crash report to know more, until I can reproduce on my own machine.

not ok 982 <webview> tag nativeWindowOpen option emits a new-window event
  Error: Timeout of 180000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
      at C:\projects\electron\spec\node_modules\mocha\lib\runnable.js:232:19

Have no idea on this one.

@zcbenz

This comment has been minimized.

Copy link
Member Author

zcbenz commented Mar 7, 2018

A few more flaky tests:

app module select-client-certificate event can respond with empty certificate list - can respond with empty certificate list
/home/builduser/project/spec/api-app-spec.js
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.


crashReporter module without sandbox should send minidump when node processes crash - should send minidump when node processes crash
/home/builduser/project/spec/api-crash-reporter-spec.js
moreError: No crash report available

crashReporter module without sandbox should send minidump when renderer crashes - should send minidump when renderer crashes
/home/builduser/project/spec/api-crash-reporter-spec.js
moreError: Timeout of 180000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

zcbenz added some commits Mar 7, 2018

@ckerr

ckerr approved these changes Mar 7, 2018

@ckerr ckerr merged commit cc6bcb6 into master Mar 7, 2018

9 checks passed

WIP ready for review
Details
ci/circleci: electron-linux-arm Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-ia32 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-x64 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
jenkins: macOS/pr-head This commit looks good
Details

@zcbenz zcbenz deleted the fix-some-flaky-ci branch Mar 7, 2018

@alexeykuzmin

This comment has been minimized.

Copy link
Contributor

alexeykuzmin commented Mar 8, 2018

Still have a few unresolved flaky tests:

not ok 713 chromium feature navigator.serviceWorker should register for file scheme
  Error: done() invoked with non-Error: unexpected error : [object Object]
      at w.webContents.on (/Users/electron/workspace/ctron_org_electron_PR-12151-2UDWGNWWM2XMSBOKHSIUX2AQ6T3VGZSKZQ5W422SUY4UU57HK7JQ/spec/chromium-spec.js:123:11)
      at CallbacksRegistry.apply (/Users/electron/workspace/ctron_org_electron_PR-12151-2UDWGNWWM2XMSBOKHSIUX2AQ6T3VGZSKZQ5W422SUY4UU57HK7JQ/out/D/Electron.app/Contents/Resources/electron.asar/common/api/callbacks-registry.js:46:25)
      at EventEmitter.ipcRenderer.on (/Users/electron/workspace/ctron_org_electron_PR-12151-2UDWGNWWM2XMSBOKHSIUX2AQ6T3VGZSKZQ5W422SUY4UU57HK7JQ/out/D/Electron.app/Contents/Resources/electron.asar/renderer/api/remote.js:261:21)
      at emitThree (events.js:135:13)
      at EventEmitter.emit (events.js:216:7)

@zcbenz I just filed #12173 for it.

sethlu added a commit to sethlu/electron that referenced this pull request May 3, 2018

Fix some flaky tests in CI (electron#12153)
* Guard whole InitPrefs with ScopedAllowIO

Saw a crash:
0 0x7f8d2f7d918d base::debug::StackTrace::StackTrace()
1 0x7f8d2f7d755c base::debug::StackTrace::StackTrace()
2 0x7f8d2f867caa logging::LogMessage::~LogMessage()
3 0x7f8d2fa157c7 base::ThreadRestrictions::AssertIOAllowed()
4 0x7f8d2f83453a base::OpenFile()
5 0x7f8d2f82a967 base::ReadFileToStringWithMaxSize()
6 0x7f8d2f82ad44 base::ReadFileToString()
7 0x7f8d2f846f73 JSONFileValueDeserializer::ReadFileToString()
8 0x7f8d2f84738c JSONFileValueDeserializer::Deserialize()
9 0x7f8d35a5d1f6 <unknown>
10 0x7f8d35a5c217 JsonPrefStore::ReadPrefs()
11 0x7f8d35a87d3e PrefService::InitFromStorage()
12 0x7f8d35a87c60 PrefService::PrefService()
13 0x7f8d35a91a10 PrefServiceFactory::Create()
14 0x000000e86e1b brightray::BrowserContext::InitPrefs()
15 0x000000c2bd64 atom::AtomBrowserContext::AtomBrowserContext()
16 0x000000c320db atom::AtomBrowserContext::From()
17 0x000000b4b8b5 atom::api::Session::FromPartition()

* Fix done being called twice in setInterval test

The callback passed to browser process is called asyncly, so it is
possible that multiple callbacks has already been scheduled before we
can clearInternval.

* Fix failing test when dir name has special chars

The pdfSource is not escaped while parsedURL.search is.

* Call done with Error instead of string

* Fix crash caused by not removing input observer

Solve crash:
0 libcontent.dylib content::RenderWidgetHostImpl::DispatchInputEventWithLatencyInfo(blink::WebInputEvent const&, ui::LatencyInfo*) + 214
1 libcontent.dylib content::RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 1350
2 libcontent.dylib content::RenderWidgetHostViewMac::ProcessMouseEvent(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 44
3 libcontent.dylib content::RenderWidgetHostInputEventRouter::RouteMouseEvent(content::RenderWidgetHostViewBase*, blink::WebMouseEvent*, ui::LatencyInfo const&) + 1817

* Print detailed error

* Run tests after server is ready
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.