edenhill commented on a change in pull request #9196:
URL: https://github.com/apache/kafka/pull/9196#discussion_r482861081



##########
File path: tests/kafkatest/tests/core/network_degrade_test.py
##########
@@ -129,10 +129,10 @@ def test_rate(self, task_name, device_name, latency_ms, 
rate_limit_kbit):
         self.logger.info("Measured rates: %s" % measured_rates)
 
         # We expect to see measured rates within an order of magnitude of our 
target rate
-        low_kbps = rate_limit_kbit / 10
+        low_kbps = rate_limit_kbit // 10
         high_kbps = rate_limit_kbit * 10
         acceptable_rates = [r for r in measured_rates if low_kbps < r < 
high_kbps]
 
         msg = "Expected most of the measured rates to be within an order of 
magnitude of target %d." % rate_limit_kbit
-        msg += " This means `tc` did not limit the bandwidth as expected."
+        msg += " This means `tc` did not limit the bandwidth as expected. 
Measured rates %s" % str(measured_rates)

Review comment:
       Until % is officially deprecated we can keep them around, no need for 
bulk-fixing them, but new code should preferably use f"" or format().
   But that's just my opinion.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to