Skip to content

Commit

Permalink
more comments to explain wtf is going on with echo test
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-writer committed Dec 11, 2019
1 parent 3c6371e commit c5c2cfa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/echo-server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
/*
* This NodeJS file starts a websocket echo server
* You don't need to manually invoke this
* Just run the tests by running client.marian/test.sh
* It will start this server and run pytests
*
* If this doesn't work, and you are debugging, first make sure you have
* nodejs version 10 or higher installed on your machine
*/

const WebSocket = require('ws');

const wss = new WebSocket.Server({ port: 8080 });

console.log("Echo websocket running at port 8080")

function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
Expand Down
9 changes: 9 additions & 0 deletions tests/test_mc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
This test shouldn't be run directly with pytest
(unless you really get what's going on)
It is meant to be run by invoking client.marian/test.sh
that shell script spins up a websocket echo server with artificial latency
which this script talks to
"""

import pytest
from essential_generators import DocumentGenerator

Expand Down

0 comments on commit c5c2cfa

Please sign in to comment.