You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
fix(UT): added dummy RM ctor to be used with UTs
This commit is contained in:
@ -244,6 +244,17 @@ ResourceManager::ResourceManager(bool runningInExeMgr, config::Config* aConfig)
|
||||
}
|
||||
}
|
||||
|
||||
// For UT
|
||||
ResourceManager::ResourceManager()
|
||||
: fExeMgrStr("ForUT")
|
||||
, fHJUmMaxMemorySmallSideDistributor(
|
||||
fHashJoinStr, "UmMaxMemorySmallSide",
|
||||
1024*1024,
|
||||
1024*1024, 0)
|
||||
, fHJPmMaxMemorySmallSideSessionMap(1024*1024)
|
||||
{
|
||||
}
|
||||
|
||||
int ResourceManager::getEmPriority() const
|
||||
{
|
||||
int temp = getIntVal(fExeMgrStr, "Priority", defaultEMPriority);
|
||||
|
@ -119,8 +119,12 @@ class ResourceManager
|
||||
/** @brief ctor
|
||||
*
|
||||
*/
|
||||
explicit ResourceManager(bool runningInExeMgr = false, config::Config* aConfig = nullptr);
|
||||
explicit ResourceManager(bool runningInExeMgr, config::Config* aConfig = nullptr);
|
||||
static ResourceManager* instance(bool runningInExeMgr = false, config::Config* aConfig = nullptr);
|
||||
|
||||
// For UT
|
||||
explicit ResourceManager();
|
||||
|
||||
config::Config* getConfig()
|
||||
{
|
||||
return fConfig;
|
||||
|
@ -124,7 +124,7 @@ TEST_F(STLPoolAllocatorTest, ResourceManagerIntegration)
|
||||
using TestType = int8_t;
|
||||
using Allocator = STLPoolAllocator<TestType>;
|
||||
|
||||
joblist::ResourceManager rm(true, nullptr);
|
||||
joblist::ResourceManager rm;
|
||||
// To set the memory allowance
|
||||
rm.setMemory(MemoryAllowance);
|
||||
Allocator alloc(&rm, 1024, 512);
|
||||
|
@ -238,7 +238,8 @@ uint32_t QueryStats::userPriority(string _host, const string _user)
|
||||
if (!fPriority.empty())
|
||||
return fPriorityLevel;
|
||||
|
||||
ResourceManager rm;
|
||||
bool runningInExeMgr = false;
|
||||
ResourceManager rm(runningInExeMgr);
|
||||
fPriorityLevel = DEFAULT_USER_PRIORITY_LEVEL;
|
||||
fPriority = DEFAULT_USER_PRIORITY;
|
||||
|
||||
|
Reference in New Issue
Block a user