Граф коммитов

45 Коммитов

Автор SHA1 Сообщение Дата
David Weitzman 6088a6f5c6 Fix a memory leak in opentsdb reporting
Responses from http.* methods must be explicitly closed.

Signed-off-by: David Weitzman <dweitzman@pinterest.com>
2018-06-17 17:38:13 -07:00
Anthony Yeh 147770fd81
Update scripts for new directory structure. 2018-02-27 12:39:30 -08:00
Alain Jobart d16596cfac Removing the etcd docker images.
They were only used for the Kubernetes demo, that now uses
etcd-operator.
2017-11-15 15:01:44 -08:00
Michael Berlin b03e58741c travis: Run tests within our "mysql57" bootstrap Docker image instead of natively.
This will fix the recent test failures and undo the change from https://github.com/youtube/vitess/issues/3203 where we had to disable the tests "unit" and "mysql_server" because they were constantly failing. With this change, the two tests are enabled again.

More importantly, with this change we no longer have to maintain Vitess' dependencies in the Travis CI environment.

Instead, we'll depend on our "bootstrap" Docker images to run the test.

Note that I had to come up with a caching mechanism for "make build". By default, we provide the test within the Docker container with a clean copy of the Git repository and run "make build" before *each* test i.e. a Travis build with 10 tests in it would have run "make build" 10 times. To avoid this, I added a new option "-use_docker_cache" to test.go which will run "make build" before all tests and use "docker commit" to create a new temporary cache image.

Overall, this change has several consequences:

- Travis CI builds will be dependent on an up to date Docker image. For example, if somebody adds a dependency to vendor/vendor.json and forgets to rebuild and push the used Docker image, "make build" will fail. I'll add a test for this in a separate commit.

- We'll use MySQL 5.7 (instead of MariaDB) for the Travis test runs.

- We can no longer use Travis container infrastructure and have to use the VM infrastructure instead. That means an additional 20 seconds wait time until Travis has started a VM and runs the build.

- More overhead per Travis build because we need to pull the Docker image first (takes up to two minutes). Before, we used Travis' caching mechanism to cache dependencies between builds.

- Slightly slower tests because the VM infrastructure has less resources than the container one (~2 CPUs (bursted) instead of 2 CPUs, see https://docs.travis-ci.com/user/reference/overview/).

- The ".git" directory will be copied into the Docker image as well now because travis/check_make_proto.sh needs it. I'll create a separate commit to integrate this.
2017-09-20 17:58:04 -07:00
Sugu Sougoumarane 7af23e1dde license: BSD->Apache v2.0
Please refer to #2694 and #2670 for motivation and reasoning for
this change.

I've tried to follow best practice in inserting the copyright
headers. In other open source projects, not all files carry
the notice. For example documentation doesn't. I've followed
similar ground rules.

I did not change the php because there is a separate LICENSE
file there by Pixel Federation. We'll first need to notify
them our intent before changing anything there.

As for the presubmit check, it's going to be non-trivial
because of the number of exceptions, like file types,
directories and generated code. So, it will have to be
a separate project.
2017-05-06 00:38:56 -07:00
Michael Berlin 9bbdbc7e76 test.go: Change the default from all flavors to mysql57.
This way a simple "./test.go unit" won't run the test for all flavors.

I've added "all" as a placeholder for all available flavors.
2016-11-16 16:31:08 -08:00
Robert Navarro 3ade15b5bf Include Percona 5.7 Docker image in docs and test runner. (#2113) 2016-10-05 15:01:52 -07:00
Michael Berlin 6f10800c31 test.go: Skip manual tests in the -shard mode. (#2035) 2016-09-08 17:36:43 -07:00
Michael Berlin b306b98a2c test: Temporarily disable the webdriver test for the new vtctld2. (#1990)
The test requires many dependencies which prolong the current test duration by up to 10 minutes on Travis.

Once we figured out how to cache the dependencies both on Travis and our local machines, we can re-enable the test.

Instead of commenting the code for installing the dependencies, I've moved it to bootstrap_web.sh for now.
2016-08-24 22:16:06 -07:00
Joshua Thompson ddca7db497 Add webdriver support for new vtctld2 UI 2016-08-16 11:26:41 -07:00
Joshua Thompson b94d79f3b9 Add test.go exclusion flag to sharded tests as well 2016-07-01 19:42:09 -07:00
Joshua Thompson 3a4050d80e Exclude webdriver tests from Travis PRs 2016-07-01 15:06:22 -07:00
Anthony Yeh 5f149b7f94 test.go: Optionally run tests in parallel. 2016-06-24 14:51:45 -07:00
Anthony Yeh 7744ea634e test.go: Run multiple flavors. 2016-06-24 14:51:45 -07:00
Anthony Yeh 4170be37ce Add Docker images for MySQL 5.7. 2016-05-20 17:59:37 -07:00
Anthony Yeh c24dc79977 docker: Switch default flavor to mysql56. 2015-11-02 17:11:28 -08:00
Anthony Yeh a05f48ba42 test.go: Add tags for grouping tests.
The Makefile previously listed tests explicitly for groups like
site_test and worker_test. These lists got out of date when tests were
removed from test/config.json, and the make rules broke. Now the groups
are defined in config.json itself, so there is one place to update
everything.
2015-10-29 13:27:23 -07:00
Anthony Yeh 5de90a8d12 test.go: Don't crash if stats contains tests that aren't in config. 2015-09-22 17:17:17 -07:00
Michael Berlin a8c3103d31 test.go: Allow tests to specify a RetryMax value.
Use travis/unit_test_runner.sh to run the Go unit tests.
2015-08-26 00:09:18 -07:00
Anthony Yeh 0e6318fd0b Merge pull request #1030 from enisoc/travis
test.go: Don't use bash for launching non-Docker tests.
2015-08-24 14:13:47 -07:00
Anthony Yeh 715c660104 test.go: Don't use bash for launching non-Docker tests.
I can't get signals to work on the child processes launched by bash,
even if I use a helper script that explicitly signals its children.
That meant that test timeouts didn't actually terminate the test in
non-Docker mode.

We were only using bash to split the command line into args anyway.
Instead, let's just have the config give us the args pre-split.
Sending signals without bash in the way seems to work better.
2015-08-24 13:44:52 -07:00
Shengzhe Yao 4266159c11 ask test.go to output absolute path for output file 2015-08-24 10:51:40 -07:00
Anthony Yeh 55c0561ed1 travis: turn off -follow for now to reduce spam in the happy case. 2015-08-23 22:11:48 -07:00
Anthony Yeh 9b00cd4e72 test.go: rename rebalance operation to avoid confusion. 2015-08-23 21:56:06 -07:00
Anthony Yeh 37fa3201c4 test.go: Assign port ranges to mitigate against zombies. 2015-08-23 21:32:34 -07:00
Anthony Yeh 48f4e10427 test.go: Clean up nested loops. 2015-08-23 20:56:12 -07:00
Anthony Yeh 99fb1650de test.go: Clarify flag descriptions. 2015-08-23 20:45:28 -07:00
Anthony Yeh 1ba645289d test.go: Remove unnecessary conditional. 2015-08-23 20:21:05 -07:00
Anthony Yeh 1ac3d8166a Use test.go for Travis and "make test". 2015-08-23 19:51:42 -07:00
Anthony Yeh 7c8d3ff669 test.go: Add log following and remote stats. 2015-08-23 18:26:02 -07:00
Anthony Yeh e02629932a test.go: Record stats for tests. 2015-08-23 17:43:41 -07:00
Anthony Yeh 082f9afd6d test.go: Add goveralls script as a manual target. 2015-08-23 17:43:41 -07:00
Anthony Yeh eb422bcf1f test.go: Add non-docker test mode. 2015-08-23 17:43:09 -07:00
Anthony Yeh 9daf3fa972 test.go: Re-pull bootstrap image by default. 2015-06-26 18:27:25 -07:00
Anthony Yeh f99c0422b1 test.go: Add a pseudo-shebang line.
This is not actually a shebang. Go doesn't support those.
This hack only works when run from within a shell.
The file gets treated as a shell script, and the first line
replaces the process with an invocation of "go run".
2015-06-16 13:36:46 -07:00
Anthony Yeh e821b84d4c test.go: Add unit tests as a target in test/config.json.
Now there's just one command to run everything.
Also, unit tests will be re-run to check for flakiness.
2015-06-16 10:56:57 -07:00
Anthony Yeh d8d0af6091 test.go: Don't overwrite logs from previous runs. 2015-06-14 13:03:14 -07:00
Anthony Yeh 20c1abfaeb test.go: Duplicate tests all at once, and track run index. 2015-06-14 11:06:11 -07:00
Anthony Yeh 543e662c08 test.go: Add -runs flag to duplicate each test N times.
This can be used, for example, to check how often a test fails:

```
$ go run test.go -retry 1 -runs 100 some_flaky_test
...
42 PASSED, 0 FLAKY, 58 FAILED, 0 SKIPPED
```
2015-06-12 00:41:52 -07:00
Anthony Yeh 0566c70f34 test.go: Add option to run only specified tests. 2015-06-12 00:32:24 -07:00
Anthony Yeh e7feb071ba [test.go] Add -extra-args flag to pass args to each test. 2015-06-04 15:54:29 -07:00
Anthony Yeh 32fd164d55 test.go: verbose logs, copy working repo to tempdir
Previously, each test would freshly re-copy the working repo before
running. Changes to the files could affect the next test in the series.
Now the entire invocation of test.go uses the same snapshot of the
working dir.

This required a global cleanup step, to delete the temp dir, so I
reworked signal handling to be global. This also opens the door to
running tests in parallel within a given test.go invocation.
2015-05-07 15:31:29 -07:00
Anthony Yeh 10ed5451b4 test.go: Return exit code 1 if any tests failed. 2015-04-22 15:27:35 -07:00
Anthony Yeh 7d3c6f94d7 test.go: Put logs in flavor subdir. 2015-04-22 14:18:45 -07:00
Anthony Yeh b14c3a308f Add test-runner script for integration tests in Docker.
This is an alternative to 'make integration_test',
with the following advantages:

* Tests run in Docker, so no bootstrap is necessary.
* Tests are hermetic and can run in parallel.
* Test against different flavors just by setting a flag.
* Failing tests are retried to see if they are flaky.
* A failed test will be recorded for later inspection, while the script
  continues to run other tests.
* A test that takes too long will be considered stuck and retried.

There's plenty of room for improvement, but now that we have something
in a more readable language than Makefile, we can iterate.
2015-04-21 20:12:20 -07:00