Closed peterkxie closed 4 years ago
reproducible for me on node 14 (v14.4.0)
found that this appears to affect node 11,12,13,14
making the timeout very large on this test can help
timing the particular call of this.bam.getHeader() in BamAdapter shows that it can sometimes take 15 seconds to complete
this might have something to do with newer zlib updates in node (they said the zlib codebase was switched to chromium's as well as some other stuff)
the getHeader uses a slice of the whole BAM file which might be a clue, and calls node.js gunzip on this slice of this data, which is bgzf data
https://travis-ci.com/github/GMOD/jbrowse-components/jobs/350085137#L253
we could remove nodeUnzip from bgzf-filehandle, this does address the issue, or we could make a long timeout, that works too, or investigate further
see here for the long time spent in getHeader... https://travis-ci.com/github/GMOD/jbrowse-components/jobs/350085137#L253
Above test fails on local machine 100% of the time with following message:
test renamed refs › test that bam with contigA instead of ctgA displays
expect(received).resolves.toBeTruthy()
Received promise rejected instead of resolved Rejected to value: [Error: Unable to find an element with the text: ctgA_110_638_0:0:0_3:0:0_15b. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Does pass on travis-ci and mostly passes on @cmdcolin local machine, may have something to do with OS or node version? My local machine specs are OSX v10.15.4, node v14.0.0. Did a fresh clone of repository and issue was not solved