zentol opened a new pull request #7003: [FLINK-10633][prometheus] Add E2E test
URL: https://github.com/apache/flink/pull/7003
 
 
   ## What is the purpose of the change
   
   This PR adds an end-to-end test for the prometheus reporter. The test starts 
prometheus and a cluster of 1 JM and 1 TM and verifies that metrics for both 
are reported to prometheus.
   
   This test follows a new paradigm for writing end-to-end tests in that is 
decoupled from our bash framework and primarily based on java.
   
   The test is written as a plain jUnit test. This means we can use the same 
classes/tools/designs etc. that we usually apply to our tests, along with the 
benefits of being able to run it in the IDE and maven, the first one making 
debugging significantly easier, the latter one giving us plenty of features for 
free, like measuring the test duration or exiting early on test failures, which 
we have painstakingly re-implemented in bash ourselves.
   
   Interactions with `flink-dist` are encapsulated in a `FlinkDistribution` 
resource.  The resource ensures that all /opt jars copied in /lib are deleted 
on exit, that the cluster is shutdown and that the configuration is reversed.
   
   The test is not run by default and can be enabled by specifying the 
`e2e-metrics` property when executing maven. Furthermore the `distDir“ property 
must be set pointing to the location of flink-dist, similar to the `FLINK_DIR` 
variable for bash tests.
   
   This branch illustrates how the new tests can (and supposedly will) be run 
on travis as part of the e2e tests: 
https://github.com/zentol/flink/tree/cron-master-e2e-with-prom
   
   ## Brief change log
   
   * add `flink-end-to-end-tests-common` containing utilities for writing 
java-based e2e tests
   * add `flink-metrics-reporter-prometheus-test` containing the test
   
   ## Verifying this change
   
   See the linked `cron-master-e2e-with-prom` branch above.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to