fix issues for hq testers: I277HD, I277HV
This commit is contained in:
parent
27698866d1
commit
6f31bdbf67
|
@ -217,7 +217,7 @@ Status CacheClient::CreateCache(uint32_t tree_crc, bool generate_id) {
|
|||
// That is allowed, however the crc better match!
|
||||
if (server_connection_id_) {
|
||||
if (cinfo_.crc() != tree_crc) {
|
||||
RETURN_STATUS_UNEXPECTED("Attempt to re-use a cache for a different tree!");
|
||||
RETURN_STATUS_UNEXPECTED("Cannot re-use a cache for a different tree!");
|
||||
}
|
||||
// Check the state of the server. For non-mappable case where there is a build phase and a fetch phase, we should
|
||||
// skip the build phase.
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace dataset {
|
|||
CacheClientGreeter::~CacheClientGreeter() { (void)ServiceStop(); }
|
||||
|
||||
CacheClientGreeter::CacheClientGreeter(const std::string &hostname, int32_t port, int32_t num_connections)
|
||||
: num_connections_(num_connections), request_cnt_(0) {
|
||||
: num_connections_(num_connections), request_cnt_(0), port_(port) {
|
||||
grpc::ChannelArguments args;
|
||||
// We need to bump up the message size to unlimited. The default receiving
|
||||
// message limit is 4MB which is not big enough.
|
||||
|
@ -119,8 +119,8 @@ Status CacheClientGreeter::WorkerEntry() {
|
|||
auto error_code = rq->rc_.error_code();
|
||||
std::string err_msg;
|
||||
if (error_code == grpc::StatusCode::UNAVAILABLE) {
|
||||
err_msg =
|
||||
"Cache server is unreachable. Make sure the server is running. GRPC Code" + std::to_string(error_code);
|
||||
err_msg = "Cache server with port " + std::to_string(port_) +
|
||||
" is unreachable. Make sure the server is running. GRPC Code" + std::to_string(error_code);
|
||||
} else {
|
||||
err_msg = rq->rc_.error_message() + ". GRPC Code " + std::to_string(error_code);
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ class CacheClientGreeter : public Service {
|
|||
mutable std::mutex mux_;
|
||||
std::map<int64_t, std::unique_ptr<CacheClientRequestTag>> req_;
|
||||
SharedMemory mem_;
|
||||
int32_t port_;
|
||||
};
|
||||
} // namespace dataset
|
||||
} // namespace mindspore
|
||||
|
|
|
@ -590,7 +590,7 @@ def test_cache_nomap_disallowed_share1():
|
|||
|
||||
with pytest.raises(RuntimeError) as e:
|
||||
sum([1 for _ in ds2])
|
||||
assert "Attempt to re-use a cache for a different tree!" in str(e.value)
|
||||
assert "Cannot re-use a cache for a different tree!" in str(e.value)
|
||||
|
||||
logger.info("test_cache_nomap_disallowed_share1 Ended.\n")
|
||||
|
||||
|
@ -1182,7 +1182,8 @@ def test_cache_nomap_server_stop():
|
|||
num_iter = 0
|
||||
for _ in ds1.create_dict_iterator():
|
||||
num_iter += 1
|
||||
assert "Network error. Cache server is unreachable. Make sure the server is running." in str(e.value)
|
||||
assert "Network error. Cache server with port 50052 is unreachable. Make sure the server is running." in \
|
||||
str(e.value)
|
||||
|
||||
logger.info("test_cache_nomap_server_stop Ended.\n")
|
||||
|
||||
|
|
Loading…
Reference in New Issue