Conversation
The tests flakiness was caused by several reasons: - tests didn't wait while Grafana inside PMM Server is fully up and running after all initializations and migrations - not all tests were idempotent - api-tests/server/settings tests update PMM Server configuration that triggers Grafana restart -> other tests fail while Grafata is unavailable. Improvements: - Added test for RTA Mongodb Agent. - api-tests/server/settings has been separated from the rest of tests and is running at the end to avoid impact on the rest of tests - Make almost all tests running in parallel -> speedup test execution - Reworked Makefile - now there are targets to prepare and run tests. reworked Makefile
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v3 #5299 +/- ##
==========================================
+ Coverage 41.49% 42.14% +0.64%
==========================================
Files 410 410
Lines 41992 41992
==========================================
+ Hits 17424 17696 +272
+ Misses 22814 22512 -302
- Partials 1754 1784 +30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| InstanceID: "d752f1a9-31c9-4b8c-bb2d-d26bc000009", | ||
| NodeModel: "some-model", | ||
| Address: "some.example.rds", | ||
| Address: "some.example-1.rds", |
There was a problem hiding this comment.
How come this field now takes a different value? Was it a buggy test?
| ENV GONOPROXY='github.com/percona,github.com/Percona-Lab' | ||
| ENV GONOSUMDB='github.com/percona,github.com/Percona-Lab' | ||
| ENV GOPRIVATE='github.com/percona,github.com/Percona-Lab' |
There was a problem hiding this comment.
Do we need all of these? It worked without it before, looks like bloat.
|
|
||
| help: ## Show available targets | ||
| @echo "Available targets: $(TARGETS)" | ||
| @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' |
There was a problem hiding this comment.
Let's leave out colors please, don't work well in all environments, especially in the logs (not human-readable).
|
|
||
| test-report: test ## Run tests and generate JUnit report | ||
| cat $(CURDIR)/$(TEST_OUTPUT_PREFIX)-*.txt | $(BIN_DIR)/go-junit-report > $(REPORT_OUT) | ||
| @echo "✅ Report is generated: $(REPORT_OUT)." |
There was a problem hiding this comment.
| @echo "✅ Report is generated: $(REPORT_OUT)." | |
| @echo "✅ Report generated: $(REPORT_OUT)." |
Just to make it consistent with the rest.
|
|
||
| 1. Run PMM Server. This can be done by running `make env-up` in the root (`pmm`) directory. | ||
| 2. Replace `$PMM_SERVER_URL` with a URL in format `http://USERNAME:PASSWORD@HOST`. For local development it's usually `http://admin:admin@127.0.0.1`. | ||
| 2. Replace `$PMM_SERVER_URL` with a URL in format `https://USERNAME:PASSWORD@HOST`. For local development it's usually `http://admin:admin@127.0.0.1`. |
There was a problem hiding this comment.
| 2. Replace `$PMM_SERVER_URL` with a URL in format `https://USERNAME:PASSWORD@HOST`. For local development it's usually `http://admin:admin@127.0.0.1`. | |
| 2. Replace `$PMM_SERVER_URL` with a URL in format `https://USERNAME:PASSWORD@HOST`. For local development it's usually `https://admin:admin@127.0.0.1`. |
I think we don't really want to test http.
|
|
||
| Precompile tests using the following command: | ||
| ``` | ||
| make -j4 init |
There was a problem hiding this comment.
-j4 should probably be part of the target so the user doesn't have to remember the syntax.
|
@maxkondr The trouble is that the snooze tests are not passing. PTAL |
Now passing |
PMM-7
Link to the Feature Build: Percona-Lab/pmm-submodules#4329
The tests flakiness was caused by several reasons:
Improvements:
Closes #2342.