Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
Impala 2.8.0
Description
Some test suites create and destroy ExecEnv objects with every test case.
However ExecEnv is meant to be used as a singleton, and the logic right now has the c'tor install the singleton pointer just once:
if (exec_env_ == NULL) exec_env_ = this;
So after TestEnv destroys its ExecEnv, the singleton pointer is invalid; any classes that use ExecEnv::GetInstance() aren't compatible with TestEnv usage.
We should add ExecEnv::InstallNewSingleton() or similar to allow test environments to reset the global singleton.