Don't wrap test timeouts
This commit is contained in:
Родитель
58f38be20e
Коммит
4ad5481e13
16
tests/test.c
16
tests/test.c
|
@ -665,7 +665,7 @@ void test_timeout_set(int timeout) {
|
|||
TEST_SAY("Setting test timeout to %ds * %.1f\n", timeout,
|
||||
test_timeout_multiplier);
|
||||
timeout = (int)((double)timeout * test_timeout_multiplier);
|
||||
test_curr->timeout = test_clock() + (timeout * 1000000);
|
||||
test_curr->timeout = test_clock() + ((int64_t)timeout * 1000000);
|
||||
TEST_UNLOCK();
|
||||
}
|
||||
|
||||
|
@ -4015,7 +4015,7 @@ void test_consumer_poll_no_msgs(const char *what,
|
|||
rd_kafka_t *rk,
|
||||
uint64_t testid,
|
||||
int timeout_ms) {
|
||||
int64_t tmout = test_clock() + timeout_ms * 1000;
|
||||
int64_t tmout = test_clock() + ((int64_t)timeout_ms * 1000);
|
||||
int cnt = 0;
|
||||
test_timing_t t_cons;
|
||||
test_msgver_t mv;
|
||||
|
@ -4085,7 +4085,7 @@ void test_consumer_poll_expect_err(rd_kafka_t *rk,
|
|||
uint64_t testid,
|
||||
int timeout_ms,
|
||||
rd_kafka_resp_err_t err) {
|
||||
int64_t tmout = test_clock() + timeout_ms * 1000;
|
||||
int64_t tmout = test_clock() + ((int64_t)timeout_ms * 1000);
|
||||
|
||||
TEST_SAY("%s: expecting error %s within %dms\n", rd_kafka_name(rk),
|
||||
rd_kafka_err2name(err), timeout_ms);
|
||||
|
@ -4874,7 +4874,7 @@ int test_get_partition_count(rd_kafka_t *rk,
|
|||
rd_kafka_t *use_rk;
|
||||
rd_kafka_resp_err_t err;
|
||||
rd_kafka_topic_t *rkt;
|
||||
int64_t abs_timeout = test_clock() + (timeout_ms * 1000);
|
||||
int64_t abs_timeout = test_clock() + ((int64_t)timeout_ms * 1000);
|
||||
int ret = -1;
|
||||
|
||||
if (!rk)
|
||||
|
@ -4931,7 +4931,7 @@ rd_kafka_resp_err_t test_auto_create_topic_rkt(rd_kafka_t *rk,
|
|||
const struct rd_kafka_metadata *metadata;
|
||||
rd_kafka_resp_err_t err;
|
||||
test_timing_t t;
|
||||
int64_t abs_timeout = test_clock() + (timeout_ms * 1000);
|
||||
int64_t abs_timeout = test_clock() + ((int64_t)timeout_ms * 1000);
|
||||
|
||||
do {
|
||||
TIMING_START(&t, "auto_create_topic");
|
||||
|
@ -5225,7 +5225,7 @@ rd_kafka_event_t *test_wait_event(rd_kafka_queue_t *eventq,
|
|||
rd_kafka_event_type_t event_type,
|
||||
int timeout_ms) {
|
||||
test_timing_t t_w;
|
||||
int64_t abs_timeout = test_clock() + (timeout_ms * 1000);
|
||||
int64_t abs_timeout = test_clock() + ((int64_t)timeout_ms * 1000);
|
||||
|
||||
TIMING_START(&t_w, "wait_event");
|
||||
while (test_clock() < abs_timeout) {
|
||||
|
@ -5523,7 +5523,7 @@ void test_wait_metadata_update(rd_kafka_t *rk,
|
|||
if (!rk)
|
||||
rk = our_rk = test_create_handle(RD_KAFKA_PRODUCER, NULL);
|
||||
|
||||
abs_timeout = test_clock() + (tmout * 1000);
|
||||
abs_timeout = test_clock() + ((int64_t)tmout * 1000);
|
||||
|
||||
TEST_SAY("Waiting for up to %dms for metadata update\n", tmout);
|
||||
|
||||
|
@ -6436,7 +6436,7 @@ rd_kafka_resp_err_t test_delete_all_test_topics(int timeout_ms) {
|
|||
rd_kafka_AdminOptions_t *options;
|
||||
rd_kafka_queue_t *q;
|
||||
char errstr[256];
|
||||
int64_t abs_timeout = test_clock() + (timeout_ms * 1000);
|
||||
int64_t abs_timeout = test_clock() + ((int64_t)timeout_ms * 1000);
|
||||
|
||||
rk = test_create_producer();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче