mirror of
https://github.com/wassname/ray.git
synced 2026-08-07 11:27:43 +08:00
Some small changes (#2782)
* Add some imports that make it easier to build with Bazel * Use "/tmp" paths for sockets in tests * Move `asio_test` into `run_gcs_tests.sh` instead of starting and stopping Redis within the test fixture with a `system` call.
This commit is contained in:
committed by
Robert Nishihara
parent
0347e6418b
commit
b6260003cb
@@ -13,7 +13,7 @@ SUITE(io_tests);
|
||||
|
||||
TEST ipc_socket_test(void) {
|
||||
#ifndef _WIN32
|
||||
const char *socket_pathname = "test-socket";
|
||||
const char *socket_pathname = "/tmp/test-socket";
|
||||
int socket_fd = bind_ipc_sock(socket_pathname, true);
|
||||
ASSERT(socket_fd >= 0);
|
||||
|
||||
@@ -55,7 +55,7 @@ TEST ipc_socket_test(void) {
|
||||
|
||||
TEST long_ipc_socket_test(void) {
|
||||
#ifndef _WIN32
|
||||
const char *socket_pathname = "long-test-socket";
|
||||
const char *socket_pathname = "/tmp/long-test-socket";
|
||||
int socket_fd = bind_ipc_sock(socket_pathname, true);
|
||||
ASSERT(socket_fd >= 0);
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ void async_redis_socket_test_callback(redisAsyncContext *ac,
|
||||
}
|
||||
|
||||
TEST redis_socket_test(void) {
|
||||
const char *socket_pathname = "redis-test-socket";
|
||||
const char *socket_pathname = "/tmp/redis-test-socket";
|
||||
redisContext *context = redisConnect("127.0.0.1", 6379);
|
||||
ASSERT(context != NULL);
|
||||
int socket_fd = bind_ipc_sock(socket_pathname, true);
|
||||
@@ -112,7 +112,7 @@ TEST async_redis_socket_test(void) {
|
||||
event_loop *loop = event_loop_create();
|
||||
|
||||
/* Start IPC channel. */
|
||||
const char *socket_pathname = "async-redis-test-socket";
|
||||
const char *socket_pathname = "/tmp/async-redis-test-socket";
|
||||
int socket_fd = bind_ipc_sock(socket_pathname, true);
|
||||
ASSERT(socket_fd >= 0);
|
||||
connections.push_back(socket_fd);
|
||||
@@ -186,7 +186,7 @@ TEST logging_test(void) {
|
||||
event_loop *loop = event_loop_create();
|
||||
|
||||
/* Start IPC channel. */
|
||||
const char *socket_pathname = "logging-test-socket";
|
||||
const char *socket_pathname = "/tmp/logging-test-socket";
|
||||
int socket_fd = bind_ipc_sock(socket_pathname, true);
|
||||
ASSERT(socket_fd >= 0);
|
||||
connections.push_back(socket_fd);
|
||||
|
||||
Reference in New Issue
Block a user