Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1055205 to your computer and use it in GitHub Desktop.
Save anonymous/1055205 to your computer and use it in GitHub Desktop.
yuitest-coverage NullPointerException on a simple js file
// 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment