Skip to content
Snippets Groups Projects

Resolve "Unit tests unter Windows"

Merged Joscha Schmiedt requested to merge f-77-unit-tests-unter-windows into dev
4 files
+ 19
8
Compare changes
  • Side-by-side
  • Inline

Files

  • fbbef962
    The singleton instances of ConfigurationManager and ConnectionManager
    were stored as static variables in the static GetInstance methods.
    
    This causes weird errors on Windows where the singleton instance is not
    initialized in time and remains empty. This could be due to
    undefined behavior?
    
    Moving them to the namespace level fixes the unit test errors.
+ 3
4
@@ -103,10 +103,8 @@ public:
@@ -103,10 +103,8 @@ public:
*/
*/
class ConfigurationManager {
class ConfigurationManager {
public:
public:
static ConfigurationManager &GetInstance() {
static ConfigurationManager &GetInstance();
static ConfigurationManager instance;
;
return instance;
};
/**
/**
* See mReset.
* See mReset.
@@ -156,6 +154,7 @@ public:
@@ -156,6 +154,7 @@ public:
private:
private:
Arena arena;
Arena arena;
JsonValue json_configuration;
JsonValue json_configuration;
 
static ConfigurationManager mInstance;
inline ConfigurationManager()
inline ConfigurationManager()
: json_configuration(nullptr){
: json_configuration(nullptr){
Loading