[ 
https://issues.apache.org/jira/browse/AVRO-3063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17475301#comment-17475301
 ] 

Martin Tzvetanov Grigorov commented on AVRO-3063:
-------------------------------------------------

[~rskraba] Is this still an issue ?
I've fixed the Buffer related warnings with 
https://github.com/apache/avro/commit/d303de5c1e1e9d1348a2a3b0de847d6a80025f00#diff-fbb88f4dbd149c68a49fbc71c325af938b73288d330a7f7e0c01d0ee91578c98
GitHub Actions regularly tests with Node 12, 14 & 16 and all is fine.

> [JS] Some tests fail using npm 7.
> ---------------------------------
>
>                 Key: AVRO-3063
>                 URL: https://issues.apache.org/jira/browse/AVRO-3063
>             Project: Apache Avro
>          Issue Type: Task
>            Reporter: Ryan Skraba
>            Priority: Major
>
> 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.
> {code}
> # 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"
> {code}
> Returns the following output:
> {code}
> 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 )
> ================================================================================
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to