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

Updated PHPUnit to version 7 + gh-24 + gh-42 + gh-85 + gh-83 + gh-71 #134

Closed
wants to merge 10 commits into from
2 changes: 1 addition & 1 deletion src/tarantool.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static int __tarantool_connect(tarantool_object *t_obj) {
TSRMLS_FETCH();
tarantool_connection *obj = t_obj->obj;
int status = SUCCESS;
long count = TARANTOOL_G(retry_count);
long count = TARANTOOL_G(retry_count) + 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in case of retry_count > 0 the real retry count will be retry_count + 1? I think it should be handled in some other way.

struct timespec sleep_time = {0};
double_to_ts(INI_FLT("retry_sleep"), &sleep_time);
char *err = NULL;
Expand Down
9 changes: 9 additions & 0 deletions test/CreateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,13 @@ public function test_09_parse_uri_compatibility() {
$c->close();
}
}

public function test_10_zero_retry_exception() {
$t = static::connectTarantool();
$rc = ini_get('tarantool.retry_count');

ini_set('tarantool.retry_count', 0);
$this->assertEquals($t->ping(), true);
ini_set('tarantool.retry_count', $rc);
}
}