Bug #45545
mgr/dashboard: make check failure in mgr-dashboard-frontend-unittests "has no exported member 'Mocks'" and "Expected 1 arguments, but got 2"
0%
Description
The error is not always reproducible, but we've seen it on some "braggi" and "ubuntu-slave[..]"-nodes.
â Test suite failed to run
[96msrc/app/core/auth/user-form/user-form.component.spec.ts [0m: [93m62 [0m: [93m5 [0m - [91merror [0m [90m TS2554: [0mExpected 1 arguments, but got 2.
[7m62 [0m true
[7m [0m [91m ~~~~ [0m
.
â Test suite failed to run
[96msrc/app/core/auth/user-form/user-form.component.spec.ts [0m: [93m62 [0m: [93m5 [0m - [91merror [0m [90m TS2554: [0mExpected 1 arguments, but got 2.
[7m62 [0m true
[7m [0m [91m ~~~~ [0m
.
â Test suite failed to run
[96msrc/app/core/auth/user-form/user-form.component.spec.ts [0m: [93m62 [0m: [93m5 [0m - [91merror [0m [90m TS2554: [0mExpected 1 arguments, but got 2.
[7m62 [0m true
[7m [0m [91m ~~~~ [0m
.
â Test suite failed to run
[96msrc/app/core/auth/user-form/user-form.component.spec.ts [0m: [93m62 [0m: [93m5 [0m - [91merror [0m [90m TS2554: [0mExpected 1 arguments, but got 2.
[7m62 [0m true
[7m [0m [91m ~~~~ [0m
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --runInBand --detectOpenHandles to find leaks.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ceph-dashboard@0.0.0 test:ci: `JEST_SILENT_REPORTER_DOTS=true jest --coverage --reporters jest-silent-reporter`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ceph-dashboard@0.0.0 test:ci script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jenkins-build/.npm/_logs/2020-05-14T04_31_01_877Z-debug.log
Linting "ceph-dashboard"...
no-use-before-declare is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
All files pass linting.
While (on braggi nodes?) there is a slightly different error in make check:
.
â Test suite failed to run
[96msrc/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts [0m: [93m16 [0m: [93m3 [0m - [91merror [0m [90m TS2305: [0mModule '"../../../../testing/unit-test-helper"' has no exported member 'Mocks'.
[7m16 [0m Mocks
[7m [0m [91m ~~~~~ [0m
.
â Test suite failed to run
[96msrc/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts [0m: [93m16 [0m: [93m3 [0m - [91merror [0m [90m TS2305: [0mModule '"../../../../testing/unit-test-helper"' has no exported member 'Mocks'.
[7m16 [0m Mocks
[7m [0m [91m ~~~~~ [0m
.
â Test suite failed to run
[96msrc/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts [0m: [93m16 [0m: [93m3 [0m - [91merror [0m [90m TS2305: [0mModule '"../../../../testing/unit-test-helper"' has no exported member 'Mocks'.
[7m16 [0m Mocks
[7m [0m [91m ~~~~~ [0m
.
â Test suite failed to run
[96msrc/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts [0m: [93m16 [0m: [93m3 [0m - [91merror [0m [90m TS2305: [0mModule '"../../../../testing/unit-test-helper"' has no exported member 'Mocks'.
[7m16 [0m Mocks
[7m [0m [91m ~~~~~ [0m
.
â Test suite failed to run
[96msrc/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts [0m: [93m16 [0m: [93m3 [0m - [91merror [0m [90m TS2305: [0mModule '"../../../../testing/unit-test-helper"' has no exported member 'Mocks'.
[7m16 [0m Mocks
[7m [0m [91m ~~~~~ [0m
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ceph-dashboard@0.0.0 test:ci: `JEST_SILENT_REPORTER_DOTS=true jest --coverage --reporters jest-silent-reporter`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ceph-dashboard@0.0.0 test:ci script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jenkins-build/.npm/_logs/2020-05-14T03_55_24_024Z-debug.log
Linting "ceph-dashboard"...
no-use-before-declare is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
All files pass linting.
Maybe https://github.com/ceph/ceph/pull/34965 is related to those issues?
History
#1 Updated by Laura Paduano almost 4 years ago
- Description updated (diff)
#2 Updated by Laura Paduano almost 4 years ago
- Description updated (diff)
#3 Updated by Kefu Chai almost 4 years ago
the version without ANSI escape code
141: src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts:16:3 - error TS2305: Module '"../../../../testing/unit-test-helper"' has no exported member 'Mocks'. 141: 141: 16 Mocks 141: ~~~~~ 141: 141: . 141: ● Test suite failed to run .... 141: npm ERR! code ELIFECYCLE 141: npm ERR! errno 1 141: npm ERR! ceph-dashboard@0.0.0 test:ci: `JEST_SILENT_REPORTER_DOTS=true jest --coverage --reporters jest-silent-reporter` 141: npm ERR! Exit status 1 141: npm ERR! 141: npm ERR! Failed at the ceph-dashboard@0.0.0 test:ci script. 141: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
snipplet of /home/jenkins-build/.npm/_logs/2020-05-14T04_00_25_370Z-debug.log
9 verbose lifecycle ceph-dashboard@0.0.0~test:ci: CWD: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/frontend 10 silly lifecycle ceph-dashboard@0.0.0~test:ci: Args: [ 10 silly lifecycle '-c', 10 silly lifecycle 'JEST_SILENT_REPORTER_DOTS=true jest --coverage --reporters jest-silent-reporter' 10 silly lifecycle ] 11 silly lifecycle ceph-dashboard@0.0.0~test:ci: Returned: code: 1 signal: null 12 info lifecycle ceph-dashboard@0.0.0~test:ci: Failed to exec test:ci script 13 verbose stack Error: ceph-dashboard@0.0.0 test:ci: `JEST_SILENT_REPORTER_DOTS=true jest --coverage --reporters jest-silent-reporter` 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/home/jenkins-build/build/workspace/ceph-pull-requests/build/src/pybind/mgr/dashboard/node-env/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:310:20) 13 verbose stack at ChildProcess.<anonymous> (/home/jenkins-build/build/workspace/ceph-pull-requests/build/src/pybind/mgr/dashboard/node-env/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:310:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
import { configureTestBed, FixtureHelper, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
the line 16 is where we import from "unit-test-helper".
#4 Updated by Stephan Müller almost 4 years ago
- Assignee set to Stephan Müller
#5 Updated by Stephan Müller almost 4 years ago
This is a jest cache problem, I also have experienced locally. To clear that you have to remove the jest cache dir which can be found running `jest --showConfig | grep cacheDir` which results for me `"cacheDirectory": "/tmp/jest_rs"`.
Another but not a good idea would be to run the unit tests without cache - having the worst test performance of 19 minutes in my test on make check.
That said I prefer clearing the jest cache dir once would clear this problem.
#6 Updated by Kefu Chai almost 4 years ago
- Status changed from New to Resolved
#7 Updated by Alfonso Martínez almost 4 years ago
- Pull request ID set to 35070
#8 Updated by Stephan Müller over 3 years ago
- Status changed from Resolved to Pending Backport
#9 Updated by Stephan Müller over 3 years ago
- Status changed from Pending Backport to Resolved
#10 Updated by Ernesto Puerta almost 3 years ago
- Project changed from mgr to Dashboard
- Category changed from 151 to Testing & QA