mirror of https://github.com/milvus-io/milvus.git
fix unittest failure
parent
f3c7fcf80e
commit
57e3c14825
|
@ -307,6 +307,7 @@ Config::ResetDefaultConfig() {
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MILVUS_GPU_VERSION
|
||||||
s = SetCacheConfigGpuCacheCapacity(CONFIG_CACHE_GPU_CACHE_CAPACITY_DEFAULT);
|
s = SetCacheConfigGpuCacheCapacity(CONFIG_CACHE_GPU_CACHE_CAPACITY_DEFAULT);
|
||||||
if (!s.ok()) {
|
if (!s.ok()) {
|
||||||
return s;
|
return s;
|
||||||
|
@ -316,6 +317,7 @@ Config::ResetDefaultConfig() {
|
||||||
if (!s.ok()) {
|
if (!s.ok()) {
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
s = SetCacheConfigCacheInsertData(CONFIG_CACHE_CACHE_INSERT_DATA_DEFAULT);
|
s = SetCacheConfigCacheInsertData(CONFIG_CACHE_CACHE_INSERT_DATA_DEFAULT);
|
||||||
if (!s.ok()) {
|
if (!s.ok()) {
|
||||||
|
|
|
@ -216,6 +216,7 @@ TEST_F(ConfigTest, SERVER_CONFIG_VALID_TEST) {
|
||||||
s = config.GetCacheConfigCpuCacheThreshold(float_val);
|
s = config.GetCacheConfigCpuCacheThreshold(float_val);
|
||||||
ASSERT_TRUE(float_val == cache_cpu_cache_threshold);
|
ASSERT_TRUE(float_val == cache_cpu_cache_threshold);
|
||||||
|
|
||||||
|
#ifdef MILVUS_GPU_VERSION
|
||||||
int64_t cache_gpu_cache_capacity = 1;
|
int64_t cache_gpu_cache_capacity = 1;
|
||||||
s = config.SetCacheConfigGpuCacheCapacity(std::to_string(cache_gpu_cache_capacity));
|
s = config.SetCacheConfigGpuCacheCapacity(std::to_string(cache_gpu_cache_capacity));
|
||||||
ASSERT_TRUE(s.ok());
|
ASSERT_TRUE(s.ok());
|
||||||
|
@ -228,6 +229,7 @@ TEST_F(ConfigTest, SERVER_CONFIG_VALID_TEST) {
|
||||||
ASSERT_TRUE(s.ok());
|
ASSERT_TRUE(s.ok());
|
||||||
s = config.GetCacheConfigGpuCacheThreshold(float_val);
|
s = config.GetCacheConfigGpuCacheThreshold(float_val);
|
||||||
ASSERT_TRUE(float_val == cache_gpu_cache_threshold);
|
ASSERT_TRUE(float_val == cache_gpu_cache_threshold);
|
||||||
|
#endif
|
||||||
|
|
||||||
bool cache_insert_data = true;
|
bool cache_insert_data = true;
|
||||||
s = config.SetCacheConfigCacheInsertData(std::to_string(cache_insert_data));
|
s = config.SetCacheConfigCacheInsertData(std::to_string(cache_insert_data));
|
||||||
|
|
Loading…
Reference in New Issue