Browse Source

HPCC-16689 Unittests hangs up after it reports the result.

Extend and re-arrange the objects destroying sequence at the end of main()

Signed-off-by: Attila Vamos <attila.vamos@gmail.com>
Attila Vamos 8 years ago
parent
commit
6687b78159
2 changed files with 8 additions and 1 deletions
  1. 2 0
      testing/unittests/CMakeLists.txt
  2. 6 1
      testing/unittests/unittests.cpp

+ 2 - 0
testing/unittests/CMakeLists.txt

@@ -41,6 +41,7 @@ include_directories (
          ./../../common/remote
          ./../../dali/base
          ./../../system/security/shared
+         ./../../common/deftype
     )
 
 ADD_DEFINITIONS( -D_CONSOLE )
@@ -52,6 +53,7 @@ target_link_libraries ( unittests
          jlib
          remote
          dalibase
+         deftype
          ${CPPUNIT_LIBRARIES}
     )
 

+ 6 - 1
testing/unittests/unittests.cpp

@@ -20,6 +20,8 @@
 #include "jstats.h"
 #include "jregexp.hpp"
 #include "jfile.hpp"
+#include "deftype.hpp"
+#include "rmtfile.hpp"
 
 /*
  * This is the main unittest driver for HPCC. From here,
@@ -242,9 +244,12 @@ int main(int argc, char* argv[])
         }
         wasSuccessful = list || runner.run( "", false );
     }
+    releaseAtoms();
+    ClearTypeCache();   // Clear this cache before the file hooks are unloaded
+    removeFileHooks();
+
     objects.kill();
     ExitModuleObjects();
-    releaseAtoms();
     return wasSuccessful;
 }