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

[Test] Investigate console error in telemetry_service.test.ts #557

Closed
ananzh opened this issue Jun 25, 2021 · 1 comment
Closed

[Test] Investigate console error in telemetry_service.test.ts #557

ananzh opened this issue Jun 25, 2021 · 1 comment
Labels
technical debt If not paid, jeapardizes long-term success and maintainability of the repository. test:unit

Comments

@ananzh
Copy link
Member

ananzh commented Jun 25, 2021

Describe the issue

Currently, telemetry_service.test.ts prints out console errors when run the unit test. To make a clean unit test, we want to explore the reasons for these errors/warnings and decide whether we could fix or remove them.

console.error
    Error: Error: connect ECONNREFUSED 127.0.0.1:80
        at Object.dispatchError (/home/anan/work/OpenSearch-Dashboards/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:60:19)
        at Request.client.on.err (/home/anan/work/OpenSearch-Dashboards/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:674:20)
        at Request.emit (events.js:203:15)
        at Request.onRequestError (/home/anan/work/OpenSearch-Dashboards/node_modules/request/request.js:877:8)
        at ClientRequest.emit (events.js:198:13)
        at Socket.socketErrorListener (_http_client.js:401:9)
        at Socket.emit (events.js:198:13)
        at emitErrorNT (internal/streams/destroy.js:91:8)
        at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
        at process._tickCallback (internal/process/next_tick.js:63:19) undefined

      at VirtualConsole.on.e (node_modules/jsdom/lib/jsdom/virtual-console.js:29:45)
      at Object.dispatchError (node_modules/jsdom/lib/jsdom/living/xhr-utils.js:63:53)
      at Request.client.on.err (node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:674:20)
      at Request.onRequestError (node_modules/request/request.js:877:8)

To Reproduce
Run:yarn test:jest {path to telemetry_service.test.ts}

Expected behavior

explore each problem unit test cases and investigate each question:

  • what causes the console error or issues?

  • should this unit test log this error or warning message?

  • if answer to the above question is no, then can we fix it?

The final output is expected to be a cleaned unit test with un-necessary error/warnings been removed.

OpenSearch Version
OpenSearch 1.0.0

Dashboards Version
Dashboards 1.0.0

@tmarkley tmarkley added the technical debt If not paid, jeapardizes long-term success and maintainability of the repository. label May 25, 2022
@ananzh
Copy link
Member Author

ananzh commented Apr 11, 2023

I don't see this issue any more. Close it.

@ananzh ananzh closed this as completed Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt If not paid, jeapardizes long-term success and maintainability of the repository. test:unit
Projects
None yet
Development

No branches or pull requests

2 participants