Make tests more informative (#372)

* Make tests more informative

* Change grpc status checks to warning instead of fatal
This commit is contained in:
Robert Nishihara
2016-08-11 12:40:55 -07:00
committed by Philipp Moritz
parent b0ecff69ad
commit fd353250c8
4 changed files with 162 additions and 192 deletions
+5 -1
View File
@@ -49,6 +49,10 @@ extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent();
if (!(condition)) {\
RAY_LOG(RAY_FATAL, "Check failed at line " << __LINE__ << " in " << __FILE__ << ": " << #condition << " with message " << message) \
}
#define RAY_WARN(condition, message) \
if (!(condition)) {\
RAY_LOG(RAY_INFO, "Check failed at line " << __LINE__ << " in " << __FILE__ << ": " << #condition << " with message " << message) \
}
#define RAY_CHECK_EQ(var1, var2, message) RAY_CHECK((var1) == (var2), message)
#define RAY_CHECK_NEQ(var1, var2, message) RAY_CHECK((var1) != (var2), message)
@@ -60,5 +64,5 @@ extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent();
#define RAY_CHECK_GRPC(expr) \
do { \
grpc::Status _s = (expr); \
RAY_CHECK(_s.ok(), "grpc call failed with message " << _s.error_message()); \
RAY_WARN(_s.ok(), "grpc call failed with message " << _s.error_message()); \
} while (0);