Since multiple self-tests could run in a series now, this makes sure that when any of them fails, the error is propagated to CircleCI but still lets them all finish.
This reverts commit 7df3ccaa2195af2628f20752104b331997137b73 which introduced a change which required `bash`.
I don't want to force `bash` for a test runner.
This might be overboard as it adds some additional code but the regex off the screen was midly unpleasant.
One additional benefit to this is that you could have a list of excluded tests stored in a separate file and use:
```
ADDL_SELF_TEST_EXCLUDE="$(cat addl_tests.txt)"
```
(note the importance of double quotes to preserve newlines)
This permits changing TIMEOUT_SCALE_FACTOR using a variable instead of hard-coding it in the script.
Also adds ADDL_SELF_TEST_EXCLUDE to define environment specific tests which must be skipped.
For example, I run my preliminary (personal) Meteor tests on SemaphoreCI, but there is a particular test that just _will not work_. This allows me to override particulary problematic tests without sed-ing the script.
This changes the CI script to make sure it runs all tests, regardless of the environment configuration while still allowing flexibility in the size of the container parallelism.
While not having any effect on the Meteor configuration this will now run all 8 test groups across a fewer number of containers, if necessary.
This fixes issues where false-positives are achieved on contributor PRs, like seen on meteor/meteor#7963. I explained here:
https://github.com/meteor/meteor/pull/7963#issuecomment-264188162
This change will also allow the script to run tests in their entirety if the parallelism configuration is missing, such as when run from a local dev box.
Although I have said I do not think Meteor should run `npm install`
automatically to update application node_modules, my real concern is that
Meteor should not interfere with your preferred node_modules-related
workflow, be it npm, npm-shinkwrap.json, yarn, yarn.lock, checking your
node_modules into git/mercurial/cvs, or whatever other scheme you have.
Automatically installing node_modules from the default package.json file
when a new app is created will eliminate real confusion, and should not
interfere with any workflows, because there is no opportunity to establish
another workflow before Meteor runs `npm install` the very first time.
While not a Meteor bug, this makes the error message more helpful when a compiler tries adding an asset without data, as demonstrated in meteor/meteor#8034.
Thanks to suggestion by @sdarnell for this.
Closesmeteor/meteor#8034
In general, we try to avoid allowing TCP connections to be open with no
traffic on it indefinitely. We place timeouts on incoming HTTP
connections in webapp_server.js (which we adjust to longer values when
there's an HTTP request pending), and once a DDP connection is fully
established we require heartbeats.
However, if the incoming connection is a websocket, the faye-websocket
package used by SockJS calls setTimeout(0) on the underlying socket when
it initializes the WebSocket object:
https://github.com/faye/faye-websocket-node/blob/3148348a3/lib/faye/websocket/api.js#L111
So if a client does the WebSocket handshake with the server but never
sends a valid DDP connect message, the socket can be held open
indefinitely. (To add insult to injury, a 1MB Buffer object is retained
on such sockets due to something in the faye-websocket code, at least on
older versions of Node like 0.10.)
This commit restores a timeout on the socket for this in-between period.
(We actually saw this issue in production on the Meteor Developer
Accounts server --- hundreds of such broken connections would accumulate
over time. This may be triggered by a particular setup we use involving
proxies for the accounts server, or it may be a more generally
applicable issue.)
See https://github.com/meteor/meteor/issues/6785
Basically,
```
new Array(249).join('\b')
```
is not a good idea for a carriage return. Code has been tested with CMD, PowerShell and PowerShell in Legacy Mode and seems to solve the issue.