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

Use the SimpleLinkService when running "annotations" reference tests #8900

Merged
merged 1 commit into from
Sep 13, 2017
Merged

Use the SimpleLinkService when running "annotations" reference tests #8900

merged 1 commit into from
Sep 13, 2017

Conversation

Snuffleupagus
Copy link
Collaborator

Rather than (basically) duplicating the SimpleLinkService in test/driver.js, with potential test failuires if you forget to update the test mock, it seems much nicer to just re-use the viewer component.

Note that SimpleLinkService is already bundled into the build/components/pdf_viewer.js file. Hence we only need to expose it similar to the other viewer components in that file, and make sure that the gulp components command runs as part of the test-setup.

Rather than (basically) duplicating the `SimpleLinkService` in `test/driver.js`, with potential test failuires if you forget to update the test mock, it seems much nicer to just re-use the viewer component.

Note that `SimpleLinkService` is already bundled into the `build/components/pdf_viewer.js` file. Hence we only need to expose it similar to the other viewer components in that file, and make sure that the `gulp components` command runs as part of the test-setup.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/1cf199f060a4258/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/9c8f8c1ebe9f37a/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/1cf199f060a4258/output.txt

Total script time: 16.76 mins

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/9c8f8c1ebe9f37a/output.txt

Total script time: 31.56 mins

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

@timvandermeij
Copy link
Contributor

timvandermeij commented Sep 12, 2017

The commit itself looks good, but I'm worried about the increase in time on the Windows bot. I saw before that, while it takes only a few seconds to run Webpack on the Linux bot, it takes up to 10 minutes on the Windows bot. This commit adds an extra Webpack step, thereby increasing the time with such an amount. I think we should figure out what the problem is on the Windows bot first. I had hoped updating Webpack to the latest version would help, but unfortunately it did not change anything.

@yurydelendik Would you be able to help out here? Do you know what may cause the Windows bot to be so slow with Webpack? I have no idea what it could possibly be doing for 10 minutes...

@Snuffleupagus
Copy link
Collaborator Author

This commit adds an extra Webpack step, thereby increasing the time with such an amount.

I'm not convinced that the added gulp components step is the culprit here, since according to the logs: [13:33:02] Finished 'components' after 7.06 s.
Looking further below, you can see [13:39:57] Finished 'generic' after 6.92 min, which is obviously slower than one would like but still on par with other (older) test runs on Windows.

Furthermore, it's not actually Webpack that's slow on Windows. Instead, it's Babel which takes a long time to run. Locally on Windows, I'm running all tests with PDFJS_NEXT=true gulp {test name here}, which disables the transpilation step and is thus very quick. Perhaps we want to skip Babel when running tests on the bots as well?

@timvandermeij
Copy link
Contributor

timvandermeij commented Sep 12, 2017

Perhaps we want to skip Babel when running tests on the bots as well?

I agree. The bots run the most recent Firefox and Chrome versions, so there should be no need for the transpilation step. Could you add a commit to disable that so we can do a new test run and see if it helps?

@Snuffleupagus
Copy link
Collaborator Author

Could you add a commit to disable that so we can do a new test run?

The changes would need to be done at https://github.com/mozilla/botio-files-pdfjs, and then pushed to the bots manually. I'll see about submitting a PR for that tomorrow!

In the meantime, I'll trigger a new round of testing to check that the Windows bot wasn't just temporarily slow when the tests ran earlier today.

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/5a8f433c89d5d22/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/25a26a45c0e3c18/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/5a8f433c89d5d22/output.txt

Total script time: 16.58 mins

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/25a26a45c0e3c18/output.txt

Total script time: 29.44 mins

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

@Snuffleupagus
Copy link
Collaborator Author

Snuffleupagus commented Sep 13, 2017

In the meantime, I'll trigger a new round of testing to check that the Windows bot wasn't just temporarily slow when the tests ran earlier today.

It seems to have been just a temporary problem, since the runtime of the Windows bot is now back to its usual value.

Edit: See also mozilla/botio-files-pdfjs#19.

@timvandermeij timvandermeij merged commit 31a3433 into mozilla:master Sep 13, 2017
@timvandermeij
Copy link
Contributor

Thank you for improving this!

Good to know that the runtime is not a new issue. The other patch will hopefully improve the runtime.

@Snuffleupagus Snuffleupagus deleted the ref-test-SimpleLinkService branch September 13, 2017 20:36
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
…kService

Use the `SimpleLinkService` when running "annotations" reference tests
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