From 3f904f17c99267a9554b87f65fe305c0c0752533 Mon Sep 17 00:00:00 2001 From: mbs Date: Tue, 3 Oct 2023 10:37:25 +0100 Subject: [PATCH] fixed bos#37786: SMESH_MGAdaptTests_without_session random failures --- src/SMESH/MG_ADAPT.cxx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/SMESH/MG_ADAPT.cxx b/src/SMESH/MG_ADAPT.cxx index 54553fd10..48da103e3 100644 --- a/src/SMESH/MG_ADAPT.cxx +++ b/src/SMESH/MG_ADAPT.cxx @@ -43,6 +43,7 @@ #include #include #include // unique_ptr +#include typedef SMESH_Comment ToComment; @@ -956,14 +957,6 @@ std::string MgAdapt::getCommandToRun() cmd+= " --in "+ meshIn; meshFormatOutputMesh = getFileName()+".mesh"; tmpFilesToBeDeleted.push_back(meshFormatOutputMesh); - if ( isFileExist( meshFormatOutputMesh )){ - int notOk; - errStr=removeFile(meshFormatOutputMesh , notOk); - if (notOk) - { - appendMsgToLogFile(errStr); - } - } cmd+= " --out "+ meshFormatOutputMesh; if (useLocalMap || useConstantValue) cmd+= " --sizemap "+ solFileIn; @@ -1144,7 +1137,7 @@ std::string MgAdapt::getFileName() const aGenericName << _getpid(); #endif aGenericName << "_"; - aGenericName << std::abs((int)(long) aGenericName.data()); + aGenericName << std::chrono::system_clock::now().time_since_epoch().count(); return aGenericName; } -- 2.30.2