Module "mock-socket" can cause false test positives and negatives
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- testing
Research direction
Start by reviewing the mock-socket server mock as a replacement for the ws Server and the listed compatibility issues: ping, connect-event values, request objects, and socket identity. Then inspect the blocked slow-reconnect test in the issue body and determine what behavior must be supported for that test to be reliable. Done means the false-positive and false-negative risks are resolved or the test strategy is clearly adjusted.
Written by the indexing model from the issue text.
Description
There are multiple issues with the library, specifically with the server mock used - in our case - as a drop-in replacement for the ws Server. It may be the case that that is not its intended use case.
Issues:
- Misses
Server.prototype.ping - Gives server instead of client in 'connect' event, which is fixed in 8.0...
- But if we upgrade this causes issues: https://github.com/thoov/mock-socket/issues/215
- Does not give request object in 'connect' event (we use that)
- Uses same object as server socket and client socket (impact unknown)
This also prevents us from implementing this test:
it('prints connect on slow reconnect', async function() {
const rc = createRemoteConsoleClient(debugServer, webSocketFactory);
const logPromise = waitForCalls(terminal.log, 2, 8000);
rc._webSocket.close(1000);
rc._disposeSocket();
await new Promise(resolve => setTimeout(resolve, 4000));
rc._connect();
const log = await logPromise;
expect(log).to.contain(' connected');
}).timeout(10000);
- Dominant language
- JavaScript
- Stars
- 11
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipsesource/tabris-js-cli
-
doc
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
feature
Difficulty 5/5 Over a week Newbie friendliness 30/100
eclipsesource/tabris-js-cli#47 · 1 comment ·
-
feature
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
build
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
cli help should adjust to terminal width (or assume less space available)May be free again @cpetrov claimed this 2349 days ago, and no pull request is open. Open
eclipsesource/tabris-js-cli#32 · 1 assignee ·
All issues in eclipsesource/tabris-js-cli
Similar issues
-
Progress difficulty filter lists Hard before MediumPossibly taken @Pandamachi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sysprog21/codetrial#281 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
yjh051108/dsh-routing-suite#227 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
needs-triage release-watch
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
remoteintech/remote-jobs#2271 ·
Maintainers usually reply within 1 day