public
Created

yuitest-coverage NullPointerException on a simple js file

  • Download Gist
yuitest-coverage-NullPointerException-timeout-js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// timeout.js that caused yuitest-coverage to throw NullPointerException
const DEFAULT_TIMEOUT = 10 * 60 * 1000;
 
function timeout(request, response, next) {
var config = request.context.config;
 
request.connection.setTimeout(config.connection_timeout || DEFAULT_TIMEOUT);
next();
}
 
module.exports = timeout;
 
// stack trace for NullPointerException
java.lang.NullPointerException
at com.yahoo.platform.yuitest.coverage.ES3YUITestParser.program(ES3YUITestParser.java:7062)
at com.yahoo.platform.yuitest.coverage.JavaScriptInstrumenter.instrument(JavaScriptInstrumenter.java:105)
at com.yahoo.platform.yuitest.coverage.FileInstrumenter.instrument(FileInstrumenter.java:96) at com.yahoo.platform.yuitest.coverage.FileInstrumenter.instrument(FileInstrumenter.java:60)
at com.yahoo.platform.yuitest.coverage.DirectoryInstrumenter.instrument(DirectoryInstrumenter.java:65) at com.yahoo.platform.yuitest.coverage.YUITestCoverage.main(YUITestCoverage.java:91)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.