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

Improve test timing #923

Merged
merged 4 commits into from
Feb 17, 2023
Merged

Conversation

relu91
Copy link
Member

@relu91 relu91 commented Feb 1, 2023

I did some improvements in our test suites hoping to reduce wasted time while developing with node-wot. With the reference to #831, the situation is improved but it is not perfect. Some caveats:

  • fake timers do not work with sockets ( I went deep down inside node.js internals and I figured out that they are not using the usual setTimeout or equivalent method but rather an internal version. Mocking the Socket.setTimeout method does not work either -> I gave up). This still causes some slowness in the Modbus protocol binding.
  • mbus still times out at 2sec even if you set another timeout
  • OPC-UA is still quite slow.

In general I think we should save about 5 seconds or more each run.

Copy link
Member

@danielpeintner danielpeintner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even small improvements are good improvements 👍

I noticed that there are 2 check warnings about

  • sleep no longer used
  • counter assigned but value never used

I think we should fix them before merging.

@danielpeintner danielpeintner merged commit 7678d8a into eclipse-thingweb:master Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants