mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 03:48:37 +08:00
[test]Fix occasional FileExistsError triggered when concurrently executing pytest (#26867)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
parent
0e2085b77f
commit
2f32623d16
@ -1,5 +1,5 @@
|
||||
import os
|
||||
import datetime
|
||||
from pathlib import Path
|
||||
|
||||
class LogConfig:
|
||||
def __init__(self):
|
||||
@ -23,10 +23,10 @@ class LogConfig:
|
||||
|
||||
@staticmethod
|
||||
def create_path(log_path):
|
||||
if not os.path.isdir(str(log_path)):
|
||||
print("[create_path] folder(%s) is not exist." % log_path)
|
||||
print("[create_path] create path now...")
|
||||
os.makedirs(log_path)
|
||||
print("[create_path] folder(%s) is not exist." % log_path)
|
||||
print("[create_path] create path now...")
|
||||
folder_path = Path(str(log_path))
|
||||
folder_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
def get_default_config(self):
|
||||
""" Make sure the path exists """
|
||||
|
Loading…
Reference in New Issue
Block a user