Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix possible faulty metrics in TestFuncProducing* #1545

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions functional_producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ func validateMetrics(t *testing.T, client Client) {
metricValidators.register(minCountMeterValidator("request-rate", 3))
metricValidators.register(minCountHistogramValidator("request-size", 3))
metricValidators.register(minValHistogramValidator("request-size", 1))
metricValidators.register(minValHistogramValidator("request-latency-in-ms", minRequestLatencyInMs))
// and at least 2 requests to the registered broker (offset + produces)
metricValidators.registerForBroker(broker, minCountMeterValidator("request-rate", 2))
metricValidators.registerForBroker(broker, minCountHistogramValidator("request-size", 2))
Expand Down Expand Up @@ -248,7 +247,6 @@ func validateMetrics(t *testing.T, client Client) {
// in exactly 2 global responses (metadata + offset)
metricValidators.register(countMeterValidator("response-rate", 2))
metricValidators.register(minCountHistogramValidator("response-size", 2))
metricValidators.register(minValHistogramValidator("response-size", 1))
// and exactly 1 offset response for the registered broker
metricValidators.registerForBroker(broker, countMeterValidator("response-rate", 1))
metricValidators.registerForBroker(broker, minCountHistogramValidator("response-size", 1))
Expand All @@ -257,7 +255,6 @@ func validateMetrics(t *testing.T, client Client) {
// in at least 3 global responses (metadata + offset + produces)
metricValidators.register(minCountMeterValidator("response-rate", 3))
metricValidators.register(minCountHistogramValidator("response-size", 3))
metricValidators.register(minValHistogramValidator("response-size", 1))
// and at least 2 for the registered broker
metricValidators.registerForBroker(broker, minCountMeterValidator("response-rate", 2))
metricValidators.registerForBroker(broker, minCountHistogramValidator("response-size", 2))
Expand Down
12 changes: 11 additions & 1 deletion vagrant/halt_cluster.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
#!/bin/sh
#!/bin/bash

# If the functional tests failed (or some other task) then
# we might want to look into the broker logs
if [ "$TRAVIS_TEST_RESULT" = "1" ]; then
echo "Dumping Kafka brokers server.log:"
for i in 1 2 3 4 5; do
KAFKA_PORT=`expr $i + 9090`
sed -e "s/^/kafka-${KAFKA_PORT} /" ${KAFKA_INSTALL_ROOT}/kafka-${KAFKA_PORT}/logs/server.log{.*,}
done
fi

set -ex

Expand Down