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

Ensure that the PDFDocumentLoadingTask is rejected when "setting up fake worker" failed (issue 10135) #10139

Merged
merged 1 commit into from
Oct 7, 2018

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Oct 5, 2018

This should, hopefully, cover all the possible ways[1] in which "fake workers" are loaded. Given the different code-paths, adding unit-tests might not be that simple. Edit: Also given that "fake workers" are only intended as a fallback anyway, and aren't really tested currently, the patch is hopefully OK even without tests.

Note that in order to make this work, the various fakeWorkerFilesLoader functions were converted to return Promises. Edit: Smaller diff with https://github.com/mozilla/pdf.js/pull/10139/files?w=1

Fixes #10135.


[1] Unfortunately there's lots of them, for various build targets and configurations.

@pdfjsbot
Copy link

pdfjsbot commented Oct 5, 2018

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/c365bd8f80112e1/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 5, 2018

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/c76daefe802cf66/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 5, 2018

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/c76daefe802cf66/output.txt

Total script time: 3.99 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Oct 5, 2018

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/c365bd8f80112e1/output.txt

Total script time: 5.33 mins

  • Unit Tests: Passed

@Snuffleupagus Snuffleupagus force-pushed the issue-10135 branch 2 times, most recently from 334e701 to 1d143a7 Compare October 5, 2018 15:05
@pdfjsbot
Copy link

pdfjsbot commented Oct 5, 2018

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/dbd9861cbbe867d/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 5, 2018

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/c9c1407a76eeea8/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 5, 2018

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/dbd9861cbbe867d/output.txt

Total script time: 3.95 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Oct 5, 2018

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/c9c1407a76eeea8/output.txt

Total script time: 5.17 mins

  • Unit Tests: Passed

@Snuffleupagus
Copy link
Collaborator Author

I think that this should now account for all the different cases.

/botio unittest

@pdfjsbot
Copy link

pdfjsbot commented Oct 6, 2018

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/32ba4254f6fb5d5/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 6, 2018

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/3229c127ff8a6a3/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 6, 2018

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/32ba4254f6fb5d5/output.txt

Total script time: 3.90 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Oct 6, 2018

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/3229c127ff8a6a3/output.txt

Total script time: 5.44 mins

  • Unit Tests: Passed

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Oct 6, 2018

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/d7525a20583caaa/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 6, 2018

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/d7525a20583caaa/output.txt

Total script time: 2.93 mins

Published

… fake worker" failed (issue 10135)

This should, hopefully, cover all the possible ways[1] in which "fake workers" are loaded. Given the different code-paths, adding unit-tests might not be that simple.
Note that in order to make this work, the various `fakeWorkerFilesLoader` functions were converted to return `Promises`.

---
[1] Unfortunately there's lots of them, for various build targets and configurations.
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('GENERIC')) {
let useRequireEnsure = false;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest update only moved this definition here, since it's unused in e.g. mozilla-central and this way it gets removed from the output.

@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Oct 7, 2018

From: Bot.io (Linux m4)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/cd033cefdf5bf81/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 7, 2018

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://54.215.176.217:8877/94daebadbb61b99/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 7, 2018

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/cd033cefdf5bf81/output.txt

Total script time: 19.81 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Oct 7, 2018

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/94daebadbb61b99/output.txt

Total script time: 24.04 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.215.176.217:8877/94daebadbb61b99/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit b2e7d0c into mozilla:master Oct 7, 2018
@timvandermeij
Copy link
Contributor

Thank you for improving the error handling here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants