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

CP-3485 Pub serve single instance for coverage #212

Merged
merged 1 commit into from
Feb 9, 2017
Merged

CP-3485 Pub serve single instance for coverage #212

merged 1 commit into from
Feb 9, 2017

Conversation

Anrock
Copy link

@Anrock Anrock commented Feb 7, 2017

Hello. This merge request changes coverage/api.dart so it uses single pub serve instance to run browser tests (if any) instead of starting and killing pub serve for each test. This reduces running time almost twice.

Copy link
Contributor

@evanweible-wf evanweible-wf left a comment

Choose a reason for hiding this comment

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

This looks really good, thank you for opening a PR @Anrock!

I just have a few comments, and then it looks like you'll need to run ddev format to fix up some formatting issues.

PubServeTask pubServeTask;
PubServeInfo serveInfo;

if (pubServe && pubServeTask == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

pubServeTask will always be null here since it is defined locally immediately before this

Copy link
Author

Choose a reason for hiding this comment

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

Oops, forgot to remove this check. At first it meant to start pub serve on demand if current test is browser test and no pub serve was running. I'll fix this and other issues tommorow. Thanks for feedback.


// Build or modify the HTML file to properly load the test.
File _createHtmlForTest(File test, File customHtml) {
Copy link
Contributor

Choose a reason for hiding this comment

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

A slightly more accurate name here might be _createOrModifyHtmlForTest()

Future<List<int>> _runTestOnVm(String testPath) async {
const String _observatoryFailPattern = 'Could not start Observatory HTTP server';
const String _testsFailedPattern = 'Some tests failed.';
const String _testsPassedPattern = 'All tests passed!';
Copy link
Contributor

Choose a reason for hiding this comment

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

Since these constants are used both here and in _runTestInBrowser() below, we should move them out so that they're only defined once.

@Anrock
Copy link
Author

Anrock commented Feb 8, 2017

@evanweible-wf fixed, please review.

@codecov-io
Copy link

codecov-io commented Feb 8, 2017

Codecov Report

Merging #212 into master will not change coverage.

@@           Coverage Diff           @@
##           master     #212   +/-   ##
=======================================
  Coverage   21.63%   21.63%           
=======================================
  Files           7        7           
  Lines         171      171           
=======================================
  Hits           37       37           
  Misses        134      134

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4866635...364ec39. Read the comment docs.

@evanweible-wf
Copy link
Contributor

+1 looks great!

If you're willing, we usually try to squash all the commits into 1 prior to merging.

@Workiva/web-platform-pp

@Anrock
Copy link
Author

Anrock commented Feb 9, 2017

@evanweible-wf squashed.

@dustinlessard-wf
Copy link

+1

1 similar comment
@evanweible-wf
Copy link
Contributor

+1

@evanweible-wf
Copy link
Contributor

+10

  • CI passes (existing coverage tests already exercise these changes)

@evanweible-wf
Copy link
Contributor

@jayudey-wf ready for you

@rmconsole3-wf rmconsole3-wf changed the title Pub serve single instance for coverage CP-3485 Pub serve single instance for coverage Feb 9, 2017
@jayudey-wf
Copy link
Contributor

jayudey-wf commented Feb 9, 2017

QA Resource Approval: +1

  • Testing instruction
  • Dev +1's
  • Dev/QA +10 with detail of what was tested
    • performed and documented by Evan
  • Unit test created/updated (current testing is sufficient)
  • All unit tests pass

Merging into master.

@jayudey-wf jayudey-wf merged commit 9bef141 into Workiva:master Feb 9, 2017
@evanweible-wf
Copy link
Contributor

Thanks again for the contribution @Anrock! This is included in the latest release (1.7.2).

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

Successfully merging this pull request may close these issues.

5 participants