提交 c4eb25b8 编写于 作者: C Chris Hajas

Remove failing CFSimulatorTest test

This test relied on the gpos OOM fault injector memory pool that was
removed in f5d88b45. It also was not being tested in CI.
Authored-by: NChris Hajas <chajas@pivotal.io>
上级 713d0816
......@@ -32,7 +32,6 @@ namespace gpos
// unittests
static GPOS_RESULT EresUnittest();
static GPOS_RESULT EresUnittest_BasicTracking();
static GPOS_RESULT EresUnittest_OOM();
}; // CFSimulatorTest
}
......
......@@ -35,8 +35,7 @@ CFSimulatorTest::EresUnittest()
{
CUnittest rgut[] =
{
GPOS_UNITTEST_FUNC(CFSimulatorTest::EresUnittest_BasicTracking),
GPOS_UNITTEST_FUNC(CFSimulatorTest::EresUnittest_OOM)
GPOS_UNITTEST_FUNC(CFSimulatorTest::EresUnittest_BasicTracking)
};
// ignore this test for FP simulation and time slicing check
......@@ -103,48 +102,6 @@ CFSimulatorTest::EresUnittest_BasicTracking()
return GPOS_FAILED;
}
//---------------------------------------------------------------------------
// @function:
// CFSimulatorTest::EresOOM
//
// @doc:
// Simulate an OOM failure
//
//---------------------------------------------------------------------------
GPOS_RESULT
CFSimulatorTest::EresUnittest_OOM()
{
// create memory pool of 128KB
CAutoMemoryPool amp(CAutoMemoryPool::ElcStrict);
CMemoryPool *mp = amp.Pmp();
GPOS_RESULT eres = GPOS_FAILED;
// enable OOM simulation
CAutoTraceFlag atf(EtraceSimulateOOM, true);
GPOS_TRY
{
// attempt allocation
GPOS_NEW_ARRAY(mp, CHAR, 1234);
}
GPOS_CATCH_EX(ex)
{
// must throw
if(GPOS_MATCH_EX(ex, CException::ExmaSystem, CException::ExmiOOM))
{
eres = GPOS_OK;
}
GPOS_RESET_EX;
}
GPOS_CATCH_END;
return eres;
}
#endif // GPOS_FPSIMULATOR
// EOF
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册