Commit Graph

61 Commits

Author SHA1 Message Date
Ben Newman
e345fc2d27 Separate failing part of "run --once" test into own test. 2016-11-02 17:07:50 -04:00
Ben Newman
476d6bf7b3 Attempt to fix "run --once" test by giving Mongo a chance to exit.
This test has been failing intermittently on Circle CI.
2016-11-02 16:25:37 -04:00
Ben Newman
dd3fe9a264 Add additional delay to "run: run" test. 2016-09-29 16:03:18 -04:00
Ben Newman
7a530f79f6 Increase more test timeouts for robustness' sake. 2016-07-14 14:52:41 -04:00
Tom Coleman
3b0ae7a903 Rebalanced tests 2016-05-25 17:03:05 -07:00
Tom Coleman
47308da931 Added a test that reproduces logging out of order 2016-05-25 10:54:43 -07:00
Tom Coleman
eadfd1f5b2 Upped timeout for bad PID test 2016-05-24 16:48:43 -07:00
Tom Coleman
c4258d68f1 Marked issues with custom-warehouse tag 2016-05-24 15:03:33 -07:00
Tom Coleman
16e0cac3e3 Upping the wait in "run and SIGKILL parent process" 2016-05-23 14:18:39 -07:00
Tom Coleman
249e4498b7 Increase timeout on test self-test (#6964) 2016-05-03 16:33:30 -07:00
Jesse Rosenberger
454a76191c Allow --port in "test" to allow a bindaddr, same as non-test
The `test` mode wasn't passing the proper proxyHost and proxyPort values to runAll.  This changes the behaviour to work the same as the regular `run` mode and also adds tests for both modes to test the bindaddr (localAddress) is taking effect properly.

Fixes meteor/meteor#6961
2016-05-03 17:35:57 +03:00
Slava Kim
3d2282d9ad fix imports for tests for tool-testing 2015-08-06 16:39:01 -07:00
Slava Kim
39d8aef3d9 move files into console/ tool-testing/ 2015-08-06 16:39:00 -07:00
Slava Kim
6b1bb038d8 Move files into tools/fs 2015-08-03 22:09:28 -07:00
Slava Kim
8a8db83d29 Move files into tools/utils 2015-08-03 20:32:38 -07:00
Slava Kim
3ddd281d8c Move catalog files into tools/catalog/ 2015-07-30 12:12:07 -07:00
Slava Kim
8900a8abfd WIP fixing minifiers 2015-07-13 15:59:13 -07:00
David Glasser
6470edf82a Fix tests broken by b6348d49
Since we no longer statically analyze app code, a syntax error in app JS
is now a run-time error, not a build-time error, which broke those
tests.  We still do some parsing on CSS as part of mergeCss, so bad CSS
will serve the same purpose.
2015-06-12 17:07:15 -07:00
David Glasser
a1e002a250 meteor run sees changes to .meteor/versions
`meteor run` doesn't always write changes to `.meteor/versions`: it only
does so if its release (or checkout-ness) matches `.meteor/release`.  So
it preferred to just remember the value of `.meteor/versions` from
rebuild to rebuild rather than forgetting what it knew and re-reading
the possibly-not-updated file.

However, if some other process changes `.meteor/versions`, it would
ignore that change.  With this fix, if `.meteor/versions` changes then
that is considered to be the previous versions list, not the last
version list from the same process.  For example, this would commonly
happen due to using `meteor update` to update packages (without changing
the tool, which would cause the runner to stop).

Fixes #3582.
2015-04-01 14:39:46 -04:00
sashko
168a39adae Fix fake mongo test on Windows 2015-03-31 08:12:03 -07:00
David Glasser
94683896b7 Don't ignore nonexistent settings file in run
Refactorings in 1.0.2 accidentally started ignoring errors related to
--settings.  Fixes #3757.
2015-02-17 16:36:39 -08:00
Avital Oliver
e866f7ca8c Tag known failing Windows self-tests
This way we can start running `meteor self-test` for regression testing,
while in parallel addressing the failures that are tagged by this commit.
2015-02-10 13:33:14 -08:00
Avital Oliver
15e87e33e8 Fix tests hard-coding METEOR as release track
Now it reads the value from catalog.DEFAULT_TRACK, which is both more
correct and necessary for the current "preview" state of Windows.

Fixed the following self-tests on Windows:
- run: update during run
- releases: springboard

Unfortunately, the autoupdate self-test still fails, maybe due to a real
bug?
2015-02-10 11:21:17 -08:00
Avital Oliver
8fb583507f Make "run" selftest pass on Windows 2015-02-06 13:47:15 -08:00
David Glasser
096df9d62d Refactor parent pid check; drop --keepalive
This commit moves parent pid process from the webapp package to the boot
script. This means that daemonized apps without webapp will also exit
when the runner exits, if run from the runner. (For example, several
self-tests such as 'autoupdate' no longer leak node processes.) This is
controlled via the $METEOR_PARENT_PID environment variable instead of
from command line arguments, in order to make fewer assumptions about
how Meteor apps process arguments.

This also drops the old --keepalive support (which already has stopped
being used by the dev mode runner or any MDG deployment platforms).
Neither --parent-pid nor --keepalive were documented beforehand, and
--keepalive was already deprecated before 1.0.

These flags used to also incidentally trigger printing the LISTENING
line; this is now controlled by $METEOR_PRINT_ON_LISTEN.

Fixes #3315.
2015-01-05 15:48:32 -08:00
Sashko Stubailo
e7167e5257 Factor out almost all fs. and path. calls in the tool
This will be useful when we want to be smart with windows file paths later
Also, all of the file calls are asynchronous with fibers now, which comes with
many benefits.

This is a combination of 23 commits. Original messages:
Wrap a large number of fs calls inside files.*

Convert a few more fs calls to files.*

More moving fs.* to files

Implement read/write streams and open/read/close

Get rid of fs from auth.js

Remove fs and unused imports from catalog-local and catalog-remote

Remove unused imports from catalog.js

Replace a whole lot of fs calls

Fix error

Migrate a lot more fs. calls to files.

Add a temporary symlink method

Convert old test to files.*

Use files.pathX instead of path.x everywhere

Replace path.x to files.pathX in tests

Small fixes to files.js and one rename

Make cleanup run in a fiber

Make wrapping functions take function name in case we need it

Add some timeouts and stuff to HCP tests

wrapFsFunc also makes a sync version of the function

Sometimes you just don't want to yield!

Make sure JsImage readFromDisk doesn't yield

Remove unused imports from npm test

Change order of test now that some things don't yield

Fix missing files import, and add a debug error printout
2014-12-15 15:32:06 -08:00
David Glasser
1e5b7437a5 Refresh catalog only on relevant errors
Fixes #2846.  Fixes #2847. Fixes #2979.

Errors in the build process that could be fixed by refreshing the
catalog now cause the catalog to refresh, assuming we have not already
refreshed it recently and that we are not offline.

These commands now don't need to refresh at startup: remove, run, debug,
create, build, bundle, deploy, test-packages, rebuild, and self-test

It should be OK for create to throw SpringboardToLatestRelease even
without refreshing, since release.latestKnown is still something we know
about.
2014-12-10 19:03:05 -08:00
David Glasser
21a34a98b3 Show mongod exit message if it started up OK
Fixes "run with mongo crash" test
2014-12-09 19:52:03 -08:00
David Glasser
118e330cba fix deadlock in mongod startup failure
AppRunner.stop needs to be able to cause any Future which the AppRunner
is waiting on to return, so that it can get back to the top level of its
loop and return. (This is because for some reason it is important that
AppRunner.stop does not return until the app is guaranteed to be
stopped.)  This had not been the place for the injected "wait for mongo
to start up before running the AppProcess" future.

This also means we can't use f.future() any more, because that code
assumes that it is the only code allowed to resolve its future (it
unconditionally resolves the future when the wrapped function returns,
which is an error if it is already resolved).

This is tested by 'run errors' which was failing.  Also, the test should
only expect 2 unexpected exit code messages, not 3, since we don't print
the message the first time which didn't have a kill before it.
2014-12-09 19:38:09 -08:00
David Glasser
c49a441d3d self-test: prepare apps after createApp
This means that the first command won't need to do a big build (and
print lots of package changed notifications). Similar to what 'meteor
create' does.

Also add --prepare-app command.
2014-12-01 14:43:15 -08:00
David Glasser
3b7459e62a start on self-test. file 'run' passes 2014-11-25 09:06:27 -08:00
Emily Stark
876d222f11 Fix 'update during run' test 2014-10-23 16:56:05 -07:00
David Glasser
0fb62f1686 make 'run' test pass 2014-10-23 10:51:20 -07:00
David Glasser
9d1adbc4f3 improve 'run: run' test 2014-10-23 10:51:20 -07:00
Emily Stark
bb29469856 Replace runtime config regression selftest with simpler unit test 2014-10-08 14:28:24 -07:00
Emily Stark
aaa9bfb048 Add regression test for edbf05db 2014-10-08 14:05:02 -07:00
Emily Stark
3069788e01 Rework --mobile-server defaults.
* --port now requires a port ('meteor run --port example.com' isn't valid).
* --mobile-server defaults to your detected IP address and the port from
    --port.
* If you provide a value for --mobile-server, we default to http:// as
  the protocol. A host is required for --mobile-server if you don't omit
  the option entirely. Similar for the --server argument to 'meteor
  build'.

This commit includes the 'netroute' npm module as a core package (which
has binary dependencies) for IP detection. It would be nice to put it in
packages/non-core, but I think it has to be a core package in order to
uniload it.
2014-10-03 12:11:44 -07:00
Emily Stark
6041122944 Exit immediately if --parent-pid doesn't look like an integer.
If you pass "--parent-pid foobar", then we immediately log an error
message and exit. This check happens via `parseInt` rather than testing
for exceptions in `process.kill(parentPid, 0)` because `process.kill`
converts its pid argument to an integer, so `process.kill('foobar', 0)`
returns true just as `process.kill(0, 0)` does.
2014-09-26 14:01:19 -07:00
Emily Stark
2f47a81395 Comments from nim, ben 2014-09-25 15:30:17 -07:00
Emily Stark
4b739b0684 Add test for runner process being SIGKILLed. 2014-09-25 15:30:17 -07:00
Justin SB
cfefbcf28f Revert 7282c0ee5b, now that 0ac1855166 has reverted bdcf0d188 2014-09-19 19:10:37 -07:00
David Glasser
7282c0ee5b Fix test (broken by bdcf0d188 at least on my mac) 2014-09-08 21:28:41 -07:00
David Glasser
08b2625082 METEOR-CORE -> METEOR 2014-08-24 18:46:37 -07:00
David Glasser
94aab913f1 self-test now passes 2014-06-26 17:32:17 -07:00
Emily Stark
382be78710 'update during run' passes.
It looks like tools trees now always have a dev_bundle/ directory
instead of bin/, include/ etc. at the top level. Someone correct me if
I'm wrong.
2014-06-25 17:33:55 -07:00
Emily Stark
7336bf901b bump some self-test timeouts 2014-06-16 18:15:38 -07:00
David Glasser
498e572230 Make self-test less flaky with more waits. 2014-04-07 20:09:30 -07:00
David Glasser
3405644027 Fix runner.stop() while waiting for file change
Before this, if the runner decided to stop (eg, because mongod is
crashing too much) while waiting for file change, it would crash due to
an attempt to wait within a fiber.  Fixing that bug by adding an inFiber
would then lead to the process just not exiting, because nothing stops
the wait-specific future.
2014-04-02 21:16:59 -07:00
David Glasser
d287d36bac Make run tests less flaky 2014-03-31 20:03:01 -07:00
Emily Stark
e981b0c629 Bump run test timeouts 2014-02-26 14:26:13 -08:00