Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3063

[JS] Some tests fail using npm 7.

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      When running npm run cover with a more recent version of node, there are some test failures. This works fine in the docker image that uses node:10.

      # From the avro root directory
      docker run -it --volume $PWD:/opt/workdir --workdir /opt/workdir node:15 bash -c "cd lang/js && ./build.sh clean && ./build.sh test && ./build.sh dist"
      

      Returns the following output:

      node:36) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
      (Use `node --trace-deprecation ...` to show where the warning was created)
      
        !!․․․․․․․․․․․․․․․․․․․․․․․․․!․․․․․․․․․․․․․․․․․․․․․․․․․․․․!․․․
        ․․․․․․․!!!․․․․․․․!․․․․!!․!․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
        ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
        ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
        ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
        ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
        ․․․․․․․․․․․․․․․․․․․․․․․
      
        372 passing (19s)
        11 failing
      
        1) Uncaught error outside test suite:
           Uncaught Error: EACCES: permission denied, open '../../build/interop/data/js.avro'
        
      
        2) Uncaught error outside test suite:
           Uncaught Error: EACCES: permission denied, open '../../build/interop/data/js_deflate.avro'
        
      
        3) files
             BlockEncoder
               empty:
           Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/workdir/lang/js/test/test_files.js)
            at listOnTimeout (node:internal/timers:557:17)
            at processTimers (node:internal/timers:500:7)
      
        4) protocols
             MessageDecoder
               ok:
           Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/workdir/lang/js/test/test_protocols.js)
            at listOnTimeout (node:internal/timers:557:17)
            at processTimers (node:internal/timers:500:7)
      
        5) protocols
             StatefulEmitter
               orphan response:
           Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/workdir/lang/js/test/test_protocols.js)
            at listOnTimeout (node:internal/timers:557:17)
            at processTimers (node:internal/timers:500:7)
      
        6) protocols
             StatefulEmitter
               ended readable:
           Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/workdir/lang/js/test/test_protocols.js)
            at listOnTimeout (node:internal/timers:557:17)
            at processTimers (node:internal/timers:500:7)
      
        7) protocols
             StatefulEmitter
               interrupted:
           Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/workdir/lang/js/test/test_protocols.js)
            at listOnTimeout (node:internal/timers:557:17)
            at processTimers (node:internal/timers:500:7)
      
        8) protocols
             StatefulListener
               end readable:
           Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/workdir/lang/js/test/test_protocols.js)
            at listOnTimeout (node:internal/timers:557:17)
            at processTimers (node:internal/timers:500:7)
      
        9) protocols
             StatefulListener
               unknown message:
           Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/workdir/lang/js/test/test_protocols.js)
            at listOnTimeout (node:internal/timers:557:17)
            at processTimers (node:internal/timers:500:7)
      
        10) protocols
             StatefulListener
               invalid request:
           Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/workdir/lang/js/test/test_protocols.js)
            at listOnTimeout (node:internal/timers:557:17)
            at processTimers (node:internal/timers:500:7)
      
        11) protocols
             StatelessListener
               unknown message:
           Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/workdir/lang/js/test/test_protocols.js)
            at listOnTimeout (node:internal/timers:557:17)
            at processTimers (node:internal/timers:500:7)
      
      
      
      =============================================================================
      Writing coverage object [/opt/workdir/lang/js/coverage/coverage.json]
      Writing coverage reports at [/opt/workdir/lang/js/coverage]
      =============================================================================
      
      =============================== Coverage summary ===============================
      Statements   : 99.84% ( 2528/2532 )
      Branches     : 99.9% ( 997/998 )
      Functions    : 99.28% ( 412/415 )
      Lines        : 99.84% ( 2442/2446 )
      ================================================================================
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rskraba Ryan Skraba
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: