NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Testing::BaseIntegrationTest Class Reference

#include <BaseIntegrationTest.hpp>

Collaboration diagram for NES::Testing::BaseIntegrationTest:
[legend]

Public Member Functions

 BaseIntegrationTest ()
 the base test class ctor that creates the internal test resources More...
 
 ~BaseIntegrationTest () override
 
void SetUp () override
 Fetches the port. More...
 
void TearDown () override
 Release internal ports. More...
 
void onFatalError (int signalNumber, std::string callstack) override
 onFatalError shall be called when a signal is caught More...
 
void onFatalException (std::shared_ptr< std::exception > exception, std::string callstack) override
 onFatalException shall be called when an exception is caught More...
 
- Public Member Functions inherited from NES::Testing::BaseUnitTest
void SetUp () override
 
void TearDown () override
 
- Public Member Functions inherited from NES::detail::virtual_enable_shared_from_this< ErrorListener >
 ~virtual_enable_shared_from_this () NES_NOEXCEPT(true) override=default
 
std::shared_ptr< T1 > shared_from_this ()
 
std::weak_ptr< T1 > weak_from_this ()
 
- Public Member Functions inherited from NES::detail::virtual_enable_shared_from_this_base< true >
virtual ~virtual_enable_shared_from_this_base () NES_NOEXCEPT(isNoexceptDestructible)=default
 
- Public Member Functions inherited from NES::Testing::detail::TestWaitingHelper
 TestWaitingHelper ()
 
void startWaitingThread (std::string testName)
 
void completeTest ()
 
void failTest ()
 

Protected Member Functions

BorrowedPortPtr getAvailablePort ()
 Retrieve another free port. More...
 
std::filesystem::path getTestResourceFolder () const
 returns the test resource folder to write files More...
 

Protected Attributes

BorrowedPortPtr rpcCoordinatorPort {nullptr}
 
BorrowedPortPtr restPort {nullptr}
 

Friends

class BorrowedPort
 

Additional Inherited Members

- Public Attributes inherited from NES::Testing::BaseUnitTest
detail::TestSourceNameHelper srcName
 

Constructor & Destructor Documentation

◆ BaseIntegrationTest()

NES::Testing::BaseIntegrationTest::BaseIntegrationTest ( )
explicit

the base test class ctor that creates the internal test resources

◆ ~BaseIntegrationTest()

NES::Testing::BaseIntegrationTest::~BaseIntegrationTest ( )
override

References NES_ASSERT2_FMT.

Member Function Documentation

◆ getAvailablePort()

BorrowedPortPtr NES::Testing::BaseIntegrationTest::getAvailablePort ( )
protected

Retrieve another free port.

Returns
a free port

References NES::Testing::detail::PortDispatcher::getNextPort(), and NES::Testing::detail::getPortDispatcher().

Referenced by NES::TCPSourceIntegrationTest::SetUp(), and NES::ConvertLogicalToPhysicalSinkTest::SetUp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTestResourceFolder()

std::filesystem::path NES::Testing::BaseIntegrationTest::getTestResourceFolder ( ) const
protected

returns the test resource folder to write files

Returns
the test folder

Referenced by NES::Runtime::Execution::JoinDeploymentTest::runAndValidateJoinQueryTwoLogicalStreams().

Here is the caller graph for this function:

◆ onFatalError()

void NES::Testing::BaseIntegrationTest::onFatalError ( int  signalNumber,
std::string   
)
overridevirtual

onFatalError shall be called when a signal is caught

Parameters
signalNumberthe caught signal
stacktracethe stacktrace of the error

Reimplemented from NES::Testing::BaseUnitTest.

References NES::Testing::detail::TestWaitingHelper::failTest(), and NES_ERROR.

Here is the call graph for this function:

◆ onFatalException()

void NES::Testing::BaseIntegrationTest::onFatalException ( std::shared_ptr< std::exception >  ,
std::string   
)
overridevirtual

onFatalException shall be called when an exception is caught

Parameters
exceptionthe caught exception
stacktracethe stacktrace of the error

Reimplemented from NES::Testing::BaseUnitTest.

References NES::Testing::detail::TestWaitingHelper::failTest(), and NES_ERROR.

Here is the call graph for this function:

◆ SetUp()

◆ TearDown()

void NES::Testing::BaseIntegrationTest::TearDown ( )
override

Release internal ports.

References NES::Testing::detail::TestWaitingHelper::completeTest(), NES_ERROR, restPort, rpcCoordinatorPort, and NES::Testing::BaseUnitTest::TearDown().

Referenced by NES::JoinMultiThreadedTest::TearDown(), NES::MultiThreadedTest::TearDown(), NES::TCPSourceIntegrationTest::TearDown(), NES::ConvertLogicalToPhysicalSinkTest::TearDown(), NES::StatisticSinkTest::TearDown(), NES::MillisecondIntervalTest::TearDown(), NES::SourceTest::TearDown(), NES::TCPSourceTest::TearDown(), and ZMQTest::TearDown().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ BorrowedPort

friend class BorrowedPort
friend

Member Data Documentation

◆ restPort

◆ rpcCoordinatorPort


The documentation for this class was generated from the following files: