Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stream_type.test.ts on CI env #2169

Closed
Tracked by #1733
noCharger opened this issue Aug 18, 2022 · 2 comments
Closed
Tracked by #1733

Fix stream_type.test.ts on CI env #2169

noCharger opened this issue Aug 18, 2022 · 2 comments
Labels
bug Something isn't working ci multiple datasource multiple datasource project

Comments

@noCharger
Copy link
Contributor

noCharger commented Aug 18, 2022

Context:

FAIL  packages/osd-config-schema/src/types/stream_type.test.ts
  ● #defaultValue › returns default when undefined

    expect(received).toMatchInlineSnapshot(snapshot)

    Snapshot name: `#defaultValue returns default when undefined 1`

    - Snapshot  - 0
    + Received  + 1

      Stream {
        "_events": Object {},
        "_eventsCount": 0,
        "_maxListeners": undefined,
    +   "domain": null,
      }

      69 |   test('returns default when undefined', () => {
      70 |     const value = new Stream();
    > 71 |     expect(schema.stream({ defaultValue: value }).validate(undefined)).toMatchInlineSnapshot(`
         |                                                                        ^
      72 |       Stream {
      73 |         "_events": Object {},
      74 |         "_eventsCount": 0,

      at Object.<anonymous> (packages/osd-config-schema/src/types/stream_type.test.ts:71:72)

Wasn't able to reproduce it on local env

yarn test:jest packages/osd-config-schema/src/types/stream_type.test.ts
yarn run v1.22.19
$ node scripts/jest packages/osd-config-schema/src/types/stream_type.test.ts
 PASS  packages/osd-config-schema/src/types/stream_type.test.ts
  ✓ returns value by default (4 ms)
  ✓ Readable is valid (1 ms)
  ✓ Writable is valid (1 ms)
  ✓ Passthrough is valid (1 ms)
  ✓ is required by default (10 ms)
  ✓ includes namespace in failure (2 ms)
  ✓ returns error when not a stream (4 ms)
  #defaultValue
    ✓ returns default when undefined (2 ms)
    ✓ returns value when specified (1 ms)
 
Test Suites: 1 passed, 1 total
Tests:       9 passed, 9 total
Snapshots:   6 passed, 6 total
Time:        3.137 s
Ran all test suites matching /packages\/osd-config-schema\/src\/types\/stream_type.test.ts/i.
✨  Done in 7.99s.

isolated jest config and test on forked repo https://github.com/elastic-analytics/OpenSearch-Dashboards/pull/27/files

@noCharger noCharger added the multiple datasource multiple datasource project label Aug 18, 2022
@zhongnansu zhongnansu added bug Something isn't working ci labels Aug 19, 2022
@zhongnansu
Copy link
Member

I see the PR from feature branch to main branch gets merged and CI passed there. Can we resolve this? Also curious what kind of fix you have done. @kristenTian

@zhongnansu
Copy link
Member

stale. Since feature merged to main. I assume this issue is no longer valid. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci multiple datasource multiple datasource project
Projects
None yet
Development

No branches or pull requests

2 participants