Skip to content

test: parallel/test-stringbytes-external is too slow #2370

Description

@bnoordhuis
$ time iojs test/parallel/test-stringbytes-external.js

real   0m3.887s
user   0m3.769s
sys    0m0.157s

It fails sporadically on the rpi1 buildbot: https://jenkins-iojs.nodesource.com/job/node-test-commit-arm/153/nodes=pi1-raspbian-wheezy/tapTestReport/test.tap-667/

/cc @trevnorris

Activity

  1. added
    testIssues and PRs related to Node.js core tests and test infrastructure.
    on Aug 13, 2015
  2. added
    armIssues and PRs related to the ARM architecture.
    on Aug 13, 2015
  3. self-assigned this
    on Aug 13, 2015
  4. trevnorris commented on Aug 13, 2015

    @trevnorris
    Contributor

    Major issue identified. All the string concatenation in the assert.*() calls in the for loops is killing things. e.g. change

    // make sure Buffers from externals are the same
    for (var i = 0; i < c_bin.length; i++) {
      assert.equal(c_bin[i], c_ucs[i], c_bin[i] + ' == ' + c_ucs[i] +
                   ' : index ' + i);
    }

    to:

    // make sure Buffers from externals are the same
    for (var i = 0; i < c_bin.length; i++) {
      if (c_bin[i] !== c_ucs[i])
      assert.equal(c_bin[i], c_ucs[i]);
    }

    a good chunk of time is lost. Same with the other 4 for loops below.

    @bnoordhuis Easy fix is to just remove all the string concatenation. Thoughts?

  5. bnoordhuis commented on Aug 13, 2015

    @bnoordhuis
    MemberAuthor

    Seems reasonable to me.

  6. evanlucas commented on Aug 13, 2015

    @evanlucas
    Contributor

    Yea, I got it down quite a bit by changing those asserts

    [~/dev/code/forks/io.js]
    :] ➜ $ time ./iojs test/parallel/test-stringbytes-external.js                                                                                                                     (master) 
            0.36 real         0.33 user         0.03 sys
    
  7. trevnorris commented on Aug 17, 2015

    @trevnorris
    Contributor

    Ref: #2410

  8. Fishrock123 commented on Sep 3, 2015

    @Fishrock123
    Contributor

    Should be fixed in 37ee43e

  9. rvagg commented on Sep 22, 2015

    @rvagg
    Member

    going to reopen this, it's failing still/again, e.g. https://ci.nodejs.org/job/node-test-binary-arm/RUN_SUBSET=2,nodes=pi1-raspbian-wheezy/34

    not ok 98 test-stringbytes-external.js
      ---
      duration_ms: 208.602
      ...
    
  10. reopened this on Sep 22, 2015
  11. Trott commented on Oct 8, 2015

    @Trott
    Member

    Hopefully #3287 fixes this.

  12. Trott commented on Oct 8, 2015

    @Trott
    Member
  13. Trott commented on Feb 3, 2016

    @Trott
    Member

    I'm pretty sure this is fixed at this point. Let's try a stress test: https://ci.nodejs.org/job/node-stress-single-test/398/nodes=pi1-raspbian-wheezy/console

  14. bnoordhuis commented on Feb 12, 2016

    @bnoordhuis
    MemberAuthor

    The buildbot went offline halfway through but 323 successful and 0 failing runs seem like good indication this issue is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

armIssues and PRs related to the ARM architecture.testIssues and PRs related to Node.js core tests and test infrastructure.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions