Получение глотка кармы исключение formatError - только на Jenkins

Я столкнулся со странным сообщением об ошибке, выдаваемым из кармы при выполнении тестов жасмина на нашем сервере jenkins.

[1A[2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 2734 of 2734 (1 FAILED) (0 secs / 54.89 secs)
[1A[2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 2734 of 2734 (1 FAILED) (59.36 secs / 54.89 secs)
[20:05:16] 'karma-tests-ci' errored after 1.33 min
[20:05:16] Error: 1
    at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10)
    at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15)
    at emitOne (events.js:101:20)
    at Gulp.emit (events.js:188:7)
    at Gulp.Orchestrator._emitTaskDone (/var/jenkins/workspace/Branch Testing/node_modules/orchestrator/index.js:264:8)
    at /var/jenkins/workspace/Branch Testing/node_modules/orchestrator/index.js:275:23
    at finish (/var/jenkins/workspace/Branch Testing/node_modules/orchestrator/lib/runTask.js:21:8)
    at cb (/var/jenkins/workspace/Branch Testing/node_modules/orchestrator/lib/runTask.js:29:3)
    at removeAllListeners (/var/jenkins/workspace/Branch Testing/node_modules/karma/lib/server.js:380:7)
    at Server.<anonymous> (/var/jenkins/workspace/Branch Testing/node_modules/karma/lib/server.js:391:9)
    at Server.g (events.js:291:16)
    at emitNone (events.js:91:20)
    at Server.emit (events.js:185:7)
    at emitCloseNT (net.js:1555:8)
    at _combinedTickCallback (internal/process/next_tick.js:71:11)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9)
[20:05:16] 'test-ci' errored after 2.48 min
[20:05:16] Error in plugin 'run-sequence(karma-tests-ci)'
Error
    at finish (/var/jenkins/workspace/Branch Testing/node_modules/run-sequence/index.js:56:13)
    at Gulp.onError (/var/jenkins/workspace/Branch Testing/node_modules/run-sequence/index.js:67:4)
    at emitOne (events.js:101:20)
    at Gulp.emit (events.js:188:7)
    at Gulp.Orchestrator._emitTaskDone (/var/jenkins/workspace/Branch Testing/node_modules/orchestrator/index.js:264:8)
    at /var/jenkins/workspace/Branch Testing/node_modules/orchestrator/index.js:275:23
    at finish (/var/jenkins/workspace/Branch Testing/node_modules/orchestrator/lib/runTask.js:21:8)
    at cb (/var/jenkins/workspace/Branch Testing/node_modules/orchestrator/lib/runTask.js:29:3)
    at removeAllListeners (/var/jenkins/workspace/Branch Testing/node_modules/karma/lib/server.js:380:7)
    at Server.<anonymous> (/var/jenkins/workspace/Branch Testing/node_modules/karma/lib/server.js:391:9)
    at Server.g (events.js:291:16)
    at emitNone (events.js:91:20)
    at Server.emit (events.js:185:7)
    at emitCloseNT (net.js:1555:8)
    at _combinedTickCallback (internal/process/next_tick.js:71:11)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9)

На самом деле тест не пройден до того, как будет выдана эта ошибка:

[1A[2KPhantomJS 2.1.1 (Linux 0.0.0) CommentViewController when isOpen is set to true and is called at operator level should call the fiancialPeriod.getFinancialPeriod method FAILED
    Expected spy get to have been called.
    stack@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:2338:37
    buildExpectationResult@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:2308:19
    expectationResultFactory@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:858:40
    addExpectationResult@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:487:58
    addExpectationResult@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:802:41
    node_modules/jasmine-core/lib/jasmine-core/jasmine.js:2252:32
    attempt@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4289:50
    run@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4217:27
    execute@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4199:13
    queueRunnerFactory@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:909:42
    execute@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:526:28
    fn@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5340:44
    attempt@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4297:30
    run@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4217:27
    execute@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4199:13
    queueRunnerFactory@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:909:42
    fn@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5325:31
    attempt@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4297:30
    run@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4217:27
    runNext@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4257:23
    node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4264:20
    node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4172:11
    onComplete@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5328:21
    node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4231:22
    onmessage@node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1774:15

Как ни странно, мы не видим локального сбоя этого модульного теста при запуске тестов, поэтому немного сбиты с толку, почему этот конкретный тест терпит неудачу только на Дженкинсе - но я думаю, что это отдельная проблема.

Следующая задача gulp используется для запуска сервера кармы и загрузки в наш файл конфигурации кармы:

gulp.task('karma-tests-ci', function(callback) {
      var Server = require('karma').Server;
      new Server({
        configFile: __dirname + paths.karmaConfCi,
        singleRun: true
      }, callback).start();
    });

Кто-нибудь еще сталкивался с этим formatError исключение из плагина gulp\karma? Является ли способ запуска сервера кармы неправильным?

Спасибо

0 ответов

Другие вопросы по тегам