NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::TestUtils Namespace Reference

this is a util class for the tests More...

Classes

class  TestPhaseProvider
 
class  TestSinkDescriptor
 This class is used for representing the description of a test sink operator. More...
 
class  TestSinkProvider
 
class  TestSourceDescriptor
 
class  TestSourceProvider
 
struct  CsvFileParams
 Struct for storing all csv file params for tests. It is solely a container for grouping csv files. More...
 
struct  SourceTypeConfigCSV
 
struct  JoinParams
 Struct for storing all parameter for the join. More...
 

Functions

QueryCompilation::QueryCompilerPtr createTestQueryCompiler (QueryCompilation::QueryCompilerOptionsPtr options=QueryCompilation::QueryCompilerOptions::createDefaultOptions())
 utility method necessary if one wants to write a test that uses a mocked sink using a test sink descriptor More...
 
const std::string configOption (const std::string &name, const std::string &value, bool prefix=false)
 
template<typename T >
std::string configOption (const std::string &name, T value, bool prefix=false)
 
std::string bufferSizeInBytes (uint64_t size, bool prefix=false)
 Creates the command line argument with a buffer size. More...
 
std::string configPath (const std::string &filename)
 Creates the command line argument for the fileName. More...
 
std::string workerConfigPath (const std::string &filename)
 Creates the command line argument for the worker config path. More...
 
std::string coordinatorPort (uint64_t coordinatorPort)
 Creates the command line argument for a coordinator port. More...
 
std::string parentId (uint64_t parentId)
 Creates the command line argument for the parent id. More...
 
std::string numberOfSlots (uint64_t coordinatorPort, bool prefix=false)
 Creates the command line argument for the numberOfSlots. More...
 
std::string numLocalBuffers (uint64_t localBuffers, bool prefix=false)
 Creates the command line argument for the number of local buffers. More...
 
std::string numGlobalBuffers (uint64_t globalBuffers, bool prefix=false)
 Creates the command line argument for the number of global buffers. More...
 
std::string rpcPort (uint64_t rpcPort)
 Creates the command line argument for the rpc port. More...
 
std::string sourceType (SourceType sourceType)
 Creates the command line argument for the source type. More...
 
std::string csvSourceFilePath (std::string filePath)
 Creates the command line argument for the csv source file path. More...
 
std::string dataPort (uint64_t dataPort)
 Creates the command line argument for the data port. More...
 
std::string numberOfTuplesToProducePerBuffer (uint64_t numberOfTuplesToProducePerBuffer)
 Creates the command line argument for the number of tuples of tuples to produce per buffer. More...
 
std::string physicalSourceName (std::string physicalSourceName)
 Creates the command line argument for the physical source name. More...
 
std::string logicalSourceName (std::string logicalSourceName)
 Creates the command line argument for setting the logical source name. More...
 
std::string numberOfBuffersToProduce (uint64_t numberOfBuffersToProduce)
 Creates the command line argument for setting the number of buffers to produce. More...
 
std::string sourceGatheringInterval (uint64_t sourceGatheringInterval)
 Creates the command line argument for setting the source gathering interval. More...
 
std::string tcpSocketHost (std::string host)
 Enables the usage of tcp socket host. More...
 
std::string tcpSocketPort (std::string port)
 Enables the usage of tcp socket port. More...
 
std::string inputFormat (std::string format)
 Enables the usage of tcp socket input format. More...
 
std::string tcpSocketPersistentSource (std::string persistentSource)
 Enables the usage of tcp socket persistent source. More...
 
std::string tcpSocketDecidedMessageSize (std::string decidedSize)
 Enables the usage of tcp socket decided message size. More...
 
std::string tcpSocketBufferSize (std::string bufferSize)
 Enables the usage of tcp socket decided message size. More...
 
std::string restPort (uint64_t restPort)
 Creates the command line argument for setting the rest port. More...
 
std::string enableDebug ()
 Creates the command line argument to enable debugging. More...
 
std::string workerHealthCheckWaitTime (uint64_t workerWaitTime)
 Creates the command line argument for setting the health check wait time for the worker. More...
 
std::string coordinatorHealthCheckWaitTime (uint64_t coordinatorWaitTime)
 Creates the command line argument for setting the health check wait time for the coordinator. More...
 
std::string enableMonitoring (bool prefix=false)
 Creates the command line argument if to enable monitoring. More...
 
std::string monitoringWaitTime (uint64_t monitoringWaitTime)
 Creates the command line argument if to set monitoring wait time. More...
 
std::string disableDistributedWindowingOptimization ()
 
std::string enableNemoPlacement ()
 Creates the command line argument for enabling nemo placement. More...
 
std::string enableNemoJoin ()
 Creates the command line argument for enabling nemo join. More...
 
std::string enableMatrixJoin ()
 Creates the command line argument for enabling matrix join. More...
 
std::string setDistributedWindowChildThreshold (uint64_t val)
 Creates the command line argument for setting the threshold of the distributed window child. More...
 
std::string setDistributedWindowCombinerThreshold (uint64_t val)
 Creates the command line argument for setting the threshold of the distributed window combiner. More...
 
std::string enableSlicingWindowing (bool prefix=false)
 Creates the command line argument if to enable slicing windowing. More...
 
std::string enableNautilusWorker ()
 Enables the usage of Nautilus. More...
 
std::string enableNautilusCoordinator ()
 Enables the usage of Nautilus at the coordinator. More...
 
Util::Subprocess startCoordinator (std::initializer_list< std::string > list)
 start a new instance of a nes coordinator with a set of configuration flags More...
 
Util::Subprocess startWorker (std::initializer_list< std::string > flags)
 start a new instance of a nes worker with a set of configuration flags More...
 
std::shared_ptr< Util::SubprocessstartWorkerPtr (std::initializer_list< std::string > flags)
 start a new instance of a nes worker with a set of configuration flags More...
 
bool checkCompleteOrTimeout (const Runtime::NodeEnginePtr &ptr, QueryId queryId, uint64_t expectedResult)
 method to check the produced buffers and tasks for n seconds and either return true or timeout More...
 
bool waitForQueryToStart (QueryId queryId, const Catalogs::Query::QueryCatalogPtr &queryCatalog, std::chrono::seconds timeoutInSec=std::chrono::seconds(defaultStartQueryTimeout))
 This method is used for waiting till the query gets into running status or a timeout occurs. More...
 
template<typename Predicate = std::equal_to<uint64_t>>
bool checkCompleteOrTimeout (const NesWorkerPtr &nesWorker, QueryId queryId, const GlobalQueryPlanPtr &globalQueryPlan, uint64_t expectedResult)
 method to check the produced buffers and tasks for n seconds and either return true or timeout More...
 
template<typename Predicate = std::equal_to<uint64_t>>
bool checkCompleteOrTimeout (const NesCoordinatorPtr &nesCoordinator, QueryId queryId, const GlobalQueryPlanPtr &globalQueryPlan, uint64_t expectedResult, bool minOneProcessedTask=false, std::chrono::seconds timeoutSeconds=defaultTimeout)
 method to check the produced buffers and tasks for n seconds and either return true or timeout More...
 
bool checkRemovedDecomposedQueryOrTimeoutAtWorker (DecomposedQueryId decomposedQueryId, DecomposedQueryPlanVersion decomposedQueryVersion, NesWorkerPtr worker, std::chrono::seconds timeout=defaultTimeout)
 
bool checkStoppedOrTimeout (QueryId queryId, const Catalogs::Query::QueryCatalogPtr &queryCatalog, std::chrono::seconds timeout=defaultTimeout)
 Check if the query is been stopped successfully within the timeout. More...
 
bool checkStoppedOrTimeoutAtWorker (SharedQueryId sharedQueryId, NesWorkerPtr worker, std::chrono::seconds timeout=defaultTimeout)
 Check if the query is been stopped successfully within the timeout. More...
 
bool checkFailedOrTimeout (QueryId queryId, const Catalogs::Query::QueryCatalogPtr &queryCatalog, std::chrono::seconds timeout=defaultTimeout)
 Check if the query has failed within the timeout. More...
 
bool checkOutputOrTimeout (string expectedContent, const string &outputFilePath, uint64_t customTimeoutInSeconds=0)
 Check if the query result was produced. More...
 
bool checkIfOutputFileIsNotEmtpy (uint64_t minNumberOfLines, const string &outputFilePath, uint64_t customTimeout=0)
 Check if any query result was produced. More...
 
bool checkOutputContentLengthOrTimeout (QueryId queryId, Catalogs::Query::QueryCatalogPtr queryCatalog, uint64_t numberOfRecordsToExpect, const string &outputFilePath, auto testTimeout=defaultTimeout)
 Check if the query result was produced. More...
 
bool checkFileCreationOrTimeout (const string &outputFilePath)
 Check if a outputfile is created. More...
 
bool checkRESTServerStartedOrTimeout (uint64_t restPort, uint64_t customTimeout=0)
 Check if Coordinator REST API is available or timeout. More...
 
bool checkCompleteOrTimeout (QueryId queryId, uint64_t expectedNumberBuffers, const std::string &restPort="8081")
 This method is used for checking if the submitted query produced the expected result within the timeout. More...
 
bool checkRunningOrTimeout (QueryId queryId, const std::string &restPort="8081")
 This method is used for checking if the submitted query is running. More...
 
bool stopQueryViaRest (QueryId queryId, const std::string &restPort="8081")
 This method is used for stop a query. More...
 
nlohmann::json getExecutionPlan (QueryId queryId, const std::string &restPort)
 This method is used for getting the execution plan via REST. More...
 
nlohmann::json startQueryViaRest (const string &queryString, const std::string &restPort="8081")
 This method is used for executing a query. More...
 
nlohmann::json addSourceStatistics (const string &queryString, const std::string &restPort="8081")
 This method is used for adding source statistics. More...
 
nlohmann::json makeMonitoringRestCall (const string &restCall, const std::string &restPort="8081")
 This method is used for making a monitoring rest call. More...
 
bool addLogicalSource (const string &schemaString, const std::string &restPort="8081")
 This method is used adding a logical source. More...
 
bool waitForWorkers (uint64_t restPort, uint16_t maxTimeout, uint16_t expectedWorkers)
 
nlohmann::json getTopology (uint64_t restPort)
 This method is used for making a REST call to coordinator to get the topology as Json. More...
 
std::vector< Runtime::TupleBuffercreateExpectedBuffersFromCsv (const std::string &csvFileName, const SchemaPtr &schema, const Runtime::BufferManagerPtr &bufferManager, uint64_t numTuplesPerBuffer)
 Creates the expected buffers from the csv file. More...
 
std::vector< Runtime::TupleBuffercreateExpectedBuffersFromCsv (const std::string &csvFileName, const SchemaPtr &schema, const Runtime::BufferManagerPtr &bufferManager, bool skipHeader=false, uint64_t numTuplesPerBuffer=0, const std::string &delimiter=",")
 Creates the expected buffers from the csv file. More...
 
std::vector< Runtime::TupleBuffercreateExpectedBufferFromStream (std::istream &istream, const SchemaPtr &schema, const Runtime::BufferManagerPtr &bufferManager, bool skipHeader=false, uint64_t numTuplesPerBuffer=0, const std::string &delimiter=",")
 Fills the buffer from a stream. More...
 
std::vector< Runtime::TupleBuffercreateExpectedBuffersFromCsvSpecificLines (const std::string &csvFileName, const SchemaPtr &schema, const Runtime::BufferManagerPtr &bufferManager, const int fromLine, const int toLine, bool skipHeader=false, uint64_t numTuplesPerBuffer=0, const std::string &delimiter=",")
 
std::vector< Runtime::TupleBuffercreateExpectedBufferFromStreamSpecificLines (std::istream &istream, const SchemaPtr &schema, const Runtime::BufferManagerPtr &bufferManager, const int fromLine, const int toLine, bool skipHeader=false, uint64_t numTuplesPerBuffer=0, const std::string &delimiter=",")
 
std::vector< Runtime::TupleBuffercreateExpectedBufferFromCSVString (std::string str, const SchemaPtr &schema, const Runtime::BufferManagerPtr &bufferManager, bool skipHeader=false, uint64_t numTuplesPerBuffer=0, const std::string &delimiter=",")
 Fills the buffer from a stream. More...
 
uint64_t countTuples (std::vector< Runtime::TupleBuffer > &buffers)
 Counts the tuple in all buffers. More...
 
uint64_t countTuples (std::vector< Runtime::MemoryLayouts::TestTupleBuffer > &buffers)
 
std::vector< Runtime::MemoryLayouts::TestTupleBuffercreateTestTupleBuffers (std::vector< Runtime::TupleBuffer > &buffers, const SchemaPtr &schema)
 Converts all of the tuple buffers to dynamic tuple buffers. More...
 
bool buffersContainSameTuples (std::vector< Runtime::MemoryLayouts::TestTupleBuffer > &expectedBuffers, std::vector< Runtime::MemoryLayouts::TestTupleBuffer > &actualBuffers, bool orderSensitive=false)
 Compares if leftBuffers contain the same tuples as rightBuffers. More...
 
template<typename T >
std::vector< T > createVecFromPointer (T *startPtr, T *endPtr)
 Creates a vector for the memory [startPtr, endPtr]. More...
 
template<typename T >
std::vector< T > createVecFromPointer (T *startPtr, uint64_t numItems)
 Creates a vector for the memory [startPtr, startPtr + numItems]. More...
 
template<typename T >
std::vector< T > createVecFromTupleBuffer (Runtime::TupleBuffer buffer)
 Creates a vector for the memory that this tupleBuffer is responsible for. More...
 
CSVSourceTypePtr createSourceTypeCSV (const SourceTypeConfigCSV &sourceTypeConfigCSV)
 Creates a csv source that produces as many buffers as the csv file contains. More...
 
std::vector< PhysicalTypePtrgetPhysicalTypes (const SchemaPtr &schema)
 
bool checkCompleteOrTimeout (const Runtime::NodeEnginePtr &ptr, SharedQueryId sharedQueryId, uint64_t expectedResult)
 method to check the produced buffers and tasks for n seconds and either return true or timeout More...
 

Detailed Description

this is a util class for the tests

Function Documentation

◆ addLogicalSource()

bool NES::TestUtils::addLogicalSource ( const string &  schemaString,
const std::string &  restPort = "8081" 
)

This method is used adding a logical source.

Parameters
querystring
Returns

References NES_DEBUG, and restPort().

Referenced by NES::TEST_F().

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

◆ addSourceStatistics()

nlohmann::json NES::TestUtils::addSourceStatistics ( const string &  queryString,
const std::string &  restPort = "8081" 
)

This method is used for adding source statistics.

This method is used for adding statistics to a source.

Parameters
querystring
Returns
if stopped

References NES_DEBUG, and restPort().

Referenced by NES::TEST_F().

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

◆ buffersContainSameTuples()

bool NES::TestUtils::buffersContainSameTuples ( std::vector< Runtime::MemoryLayouts::TestTupleBuffer > &  expectedBuffers,
std::vector< Runtime::MemoryLayouts::TestTupleBuffer > &  actualBuffers,
bool  orderSensitive = false 
)

Compares if leftBuffers contain the same tuples as rightBuffers.

Parameters
expectedBuffers
actualBuffers
orderSensitiveIf set to true, the order is taken into account
Returns
True if the leftBuffers contain the same tuples in the rightBuffer

References NES_ERROR.

Referenced by NES::Runtime::Execution::JoinDeploymentTest::runAndValidateJoinQueryTwoLogicalStreams(), NES::Runtime::Execution::MultipleJoinsTest::runJoinQuery(), NES::FileSinkIntegrationTest::runQueryAndVerifyExpectedResults(), NES::TEST_F(), and TEST_P().

Here is the caller graph for this function:

◆ bufferSizeInBytes()

std::string NES::TestUtils::bufferSizeInBytes ( uint64_t  size,
bool  prefix = false 
)

Creates the command line argument with a buffer size.

Parameters
size
prefix
Returns
Command line argument

References configOption(), and size().

Referenced by NES::TEST_F().

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

◆ checkCompleteOrTimeout() [1/5]

template<typename Predicate = std::equal_to<uint64_t>>
bool NES::TestUtils::checkCompleteOrTimeout ( const NesCoordinatorPtr nesCoordinator,
QueryId  queryId,
const GlobalQueryPlanPtr globalQueryPlan,
uint64_t  expectedResult,
bool  minOneProcessedTask = false,
std::chrono::seconds  timeoutSeconds = defaultTimeout 
)

method to check the produced buffers and tasks for n seconds and either return true or timeout

Parameters
nesCoordinatorto NesCoordinator
queryId
queryCatalog
expectedResult
Returns
bool indicating if the expected results are matched

◆ checkCompleteOrTimeout() [2/5]

template<typename Predicate = std::equal_to<uint64_t>>
bool NES::TestUtils::checkCompleteOrTimeout ( const NesWorkerPtr nesWorker,
QueryId  queryId,
const GlobalQueryPlanPtr globalQueryPlan,
uint64_t  expectedResult 
)

method to check the produced buffers and tasks for n seconds and either return true or timeout

Parameters
nesWorkerto NesWorker
queryId
queryCatalog
expectedResult
Returns
bool indicating if the expected results are matched

◆ checkCompleteOrTimeout() [3/5]

bool NES::TestUtils::checkCompleteOrTimeout ( const Runtime::NodeEnginePtr ptr,
QueryId  queryId,
uint64_t  expectedResult 
)

method to check the produced buffers and tasks for n seconds and either return true or timeout

Parameters
ptrto Runtime
queryId
expectedResult
Returns
bool indicating if the expected results are matched

Referenced by NES::MonitoringQueriesTest::runMetricsQueryTest(), and NES::TEST_F().

Here is the caller graph for this function:

◆ checkCompleteOrTimeout() [4/5]

bool NES::TestUtils::checkCompleteOrTimeout ( const Runtime::NodeEnginePtr ptr,
SharedQueryId  sharedQueryId,
uint64_t  expectedResult 
)

method to check the produced buffers and tasks for n seconds and either return true or timeout

Parameters
ptrto Runtime
sharedQueryId
expectedResult
Returns
bool indicating if the expected results are matched

References NES_ERROR, and NES_TRACE.

◆ checkCompleteOrTimeout() [5/5]

bool NES::TestUtils::checkCompleteOrTimeout ( QueryId  queryId,
uint64_t  expectedNumberBuffers,
const std::string &  restPort = "8081" 
)

This method is used for checking if the submitted query produced the expected result within the timeout.

Parameters
queryIdId of the query
expectedNumberBuffersThe expected value
Returns
true if matched the expected result within the timeout

References NES_DEBUG, restPort(), and NES::NESStrongType< T, Tag, invalid, initial >::toString().

Here is the call graph for this function:

◆ checkFailedOrTimeout()

bool NES::TestUtils::checkFailedOrTimeout ( QueryId  queryId,
const Catalogs::Query::QueryCatalogPtr queryCatalog,
std::chrono::seconds  timeout = defaultTimeout 
)

Check if the query has failed within the timeout.

Parameters
queryIdId of the query to be stopped
queryCatalogthe catalog containig the queries in the system
Returns
true if successful

References magic_enum::enum_name(), NES::FAILED, NES_DEBUG, NES_TRACE, NES_WARNING, and NES::timeout.

Referenced by NES::TestHarness::checkFailedOrTimeout(), and NES::TEST_F().

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

◆ checkFileCreationOrTimeout()

bool NES::TestUtils::checkFileCreationOrTimeout ( const string &  outputFilePath)

Check if a outputfile is created.

Parameters
expectedContent
outputFilePath
Returns
true if successful

References NES_TRACE.

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ checkIfOutputFileIsNotEmtpy()

bool NES::TestUtils::checkIfOutputFileIsNotEmtpy ( uint64_t  minNumberOfLines,
const string &  outputFilePath,
uint64_t  customTimeout = 0 
)

Check if any query result was produced.

Parameters
outputFilePath
Returns
true if successful

References NES_ERROR, and NES_TRACE.

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ checkOutputContentLengthOrTimeout()

bool NES::TestUtils::checkOutputContentLengthOrTimeout ( QueryId  queryId,
Catalogs::Query::QueryCatalogPtr  queryCatalog,
uint64_t  numberOfRecordsToExpect,
const string &  outputFilePath,
auto  testTimeout = defaultTimeout 
)

Check if the query result was produced.

Parameters
queryId
queryCatalogService
numberOfRecordsToExpect
outputFilePath
testTimeout
Returns
True if numberOfRecordsToExpect have been seen

Referenced by NES::TestHarness::runQuery().

Here is the caller graph for this function:

◆ checkOutputOrTimeout()

bool NES::TestUtils::checkOutputOrTimeout ( string  expectedContent,
const string &  outputFilePath,
uint64_t  customTimeoutInSeconds = 0 
)

Check if the query result was produced.

Parameters
expectedContent
outputFilePath
Returns
true if successful
Parameters
expectedContent
outputFilePath
customTimeoutInSeconds
Returns
true if successful

References NES_ERROR, and NES_TRACE.

Referenced by NES::TEST_F(), and NES::TEST_P().

Here is the caller graph for this function:

◆ checkRemovedDecomposedQueryOrTimeoutAtWorker()

bool NES::TestUtils::checkRemovedDecomposedQueryOrTimeoutAtWorker ( DecomposedQueryId  decomposedQueryId,
DecomposedQueryPlanVersion  decomposedQueryVersion,
NesWorkerPtr  worker,
std::chrono::seconds  timeout = defaultTimeout 
)

◆ checkRESTServerStartedOrTimeout()

bool NES::TestUtils::checkRESTServerStartedOrTimeout ( uint64_t  restPort,
uint64_t  customTimeout = 0 
)

Check if Coordinator REST API is available or timeout.

Parameters
expectedContent
outputFilePath
Returns
true if successful

References NES_INFO, NES_TRACE, and restPort().

Referenced by NES::TEST_F().

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

◆ checkRunningOrTimeout()

bool NES::TestUtils::checkRunningOrTimeout ( QueryId  queryId,
const std::string &  restPort = "8081" 
)

This method is used for checking if the submitted query is running.

Parameters
queryIdId of the query
Returns
true if is running within the timeout, else false

References NES_DEBUG, restPort(), and NES::NESStrongType< T, Tag, invalid, initial >::toString().

Referenced by NES::TEST_F(), and NES::MonitoringControllerTest::waitForMonitoringQuery().

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

◆ checkStoppedOrTimeout()

bool NES::TestUtils::checkStoppedOrTimeout ( QueryId  queryId,
const Catalogs::Query::QueryCatalogPtr queryCatalog,
std::chrono::seconds  timeout = defaultTimeout 
)

Check if the query is been stopped successfully within the timeout.

Parameters
queryIdId of the query to be stopped
queryCatalogthe catalog containig the queries in the system
Returns
true if successful

References magic_enum::enum_name(), NES_DEBUG, NES_TRACE, NES_WARNING, NES::STOPPED, and NES::timeout.

Referenced by NES::MonitoringQueriesTest::runMetricsQueryTest(), NES::TestHarness::runQuery(), and NES::TEST_F().

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

◆ checkStoppedOrTimeoutAtWorker()

bool NES::TestUtils::checkStoppedOrTimeoutAtWorker ( SharedQueryId  sharedQueryId,
NesWorkerPtr  worker,
std::chrono::seconds  timeout = defaultTimeout 
)

Check if the query is been stopped successfully within the timeout.

Parameters
sharedQueryIdId of the query to be stopped
workerthe worker which the query runs on
Returns
true if successful

References NES::Runtime::Execution::Created, NES::Runtime::Execution::Deployed, NES::Runtime::Execution::ErrorState, NES::Runtime::Execution::Finished, NES::Runtime::Execution::Invalid, NES_DEBUG, NES_TRACE, NES::Runtime::Execution::Running, NES::Runtime::Execution::Stopped, NES::timeout, and worker.

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ configOption() [1/2]

const std::string NES::TestUtils::configOption ( const std::string &  name,
const std::string &  value,
bool  prefix = false 
)

Create a command line parameter for a configuration option for the coordinator or worker.

Parameters
nameThe name of the command line option.
valueThe value of the command line option.
prefixIf true, prefix the name of the option with "worker." to configure the internal worker of the coordinator.
Returns
A string representing the command line parameter.

References magic_enum::detail::value().

Referenced by bufferSizeInBytes(), enableMonitoring(), enableSlicingWindowing(), numberOfSlots(), numGlobalBuffers(), and numLocalBuffers().

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

◆ configOption() [2/2]

template<typename T >
std::string NES::TestUtils::configOption ( const std::string &  name,
value,
bool  prefix = false 
)

Create a command line parameter for a configuration option for the coordinator or worker.

Parameters
nameThe name of the command line option.
valueThe value of the command line option.
prefixIf true, prefix the name of the option with "worker." to configure the internal worker of the coordinator.
Returns
A string representing the command line parameter.

References magic_enum::detail::value().

Here is the call graph for this function:

◆ configPath()

std::string NES::TestUtils::configPath ( const std::string &  filename)

Creates the command line argument for the fileName.

Parameters
filename
Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ coordinatorHealthCheckWaitTime()

std::string NES::TestUtils::coordinatorHealthCheckWaitTime ( uint64_t  coordinatorWaitTime)

Creates the command line argument for setting the health check wait time for the coordinator.

Parameters
coordinatorWaitTime
Returns
Command line argument

◆ coordinatorPort()

std::string NES::TestUtils::coordinatorPort ( uint64_t  coordinatorPort)

Creates the command line argument for a coordinator port.

Parameters
coordinatorPort
Returns
Command line argument

Referenced by numberOfSlots(), and NES::TEST_F().

Here is the caller graph for this function:

◆ countTuples() [1/2]

uint64_t NES::TestUtils::countTuples ( std::vector< Runtime::MemoryLayouts::TestTupleBuffer > &  buffers)

◆ countTuples() [2/2]

uint64_t NES::TestUtils::countTuples ( std::vector< Runtime::TupleBuffer > &  buffers)

Counts the tuple in all buffers.

Parameters
buffers
Returns
Tuplecount

Referenced by NES::TEST_F(), and NES::TestSink::writeData().

Here is the caller graph for this function:

◆ createExpectedBufferFromCSVString()

std::vector<Runtime::TupleBuffer> NES::TestUtils::createExpectedBufferFromCSVString ( std::string  str,
const SchemaPtr schema,
const Runtime::BufferManagerPtr bufferManager,
bool  skipHeader = false,
uint64_t  numTuplesPerBuffer = 0,
const std::string &  delimiter = "," 
)

Fills the buffer from a stream.

Parameters
str
schema
bufferManager
skipHeader
numTuplesPerBuffer
delimiter
Returns
Vector of TupleBuffers

Referenced by NES::Runtime::Execution::MultipleJoinsTest::runJoinQuery(), NES::FileSinkIntegrationTest::runQueryAndVerifyExpectedResults(), and NES::TEST_F().

Here is the caller graph for this function:

◆ createExpectedBufferFromStream()

std::vector< Runtime::TupleBuffer > NES::TestUtils::createExpectedBufferFromStream ( std::istream &  istream,
const SchemaPtr schema,
const Runtime::BufferManagerPtr bufferManager,
bool  skipHeader = false,
uint64_t  numTuplesPerBuffer = 0,
const std::string &  delimiter = "," 
)

Fills the buffer from a stream.

Parameters
csvFileName
schema
bufferManager
skipHeader
numTuplesPerBuffer
delimiter
Returns
Vector of TupleBuffers

References NES::Runtime::MemoryLayouts::TestTupleBuffer::createTestTupleBuffer(), getPhysicalTypes(), and NES_DEBUG.

Referenced by createExpectedBuffersFromCsv(), NES::Runtime::Execution::JoinDeploymentTest::runAndValidateJoinQueryTwoLogicalStreams(), and NES::TEST_F().

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

◆ createExpectedBufferFromStreamSpecificLines()

std::vector< Runtime::TupleBuffer > NES::TestUtils::createExpectedBufferFromStreamSpecificLines ( std::istream &  istream,
const SchemaPtr schema,
const Runtime::BufferManagerPtr bufferManager,
const int  fromLine,
const int  toLine,
bool  skipHeader = false,
uint64_t  numTuplesPerBuffer = 0,
const std::string &  delimiter = "," 
)

References NES::Runtime::MemoryLayouts::TestTupleBuffer::createTestTupleBuffer(), getPhysicalTypes(), and NES_DEBUG.

Here is the call graph for this function:

◆ createExpectedBuffersFromCsv() [1/2]

std::vector< Runtime::TupleBuffer > NES::TestUtils::createExpectedBuffersFromCsv ( const std::string &  csvFileName,
const SchemaPtr schema,
const Runtime::BufferManagerPtr bufferManager,
bool  skipHeader = false,
uint64_t  numTuplesPerBuffer = 0,
const std::string &  delimiter = "," 
)

Creates the expected buffers from the csv file.

Parameters
csvFileName
schema
bufferManager
skipHeader
numTuplesPerBuffer
delimiter
Returns
Vector of TupleBuffers

References createExpectedBufferFromStream(), NES_ASSERT2_FMT, and NES_DEBUG.

Here is the call graph for this function:

◆ createExpectedBuffersFromCsv() [2/2]

std::vector<Runtime::TupleBuffer> NES::TestUtils::createExpectedBuffersFromCsv ( const std::string &  csvFileName,
const SchemaPtr schema,
const Runtime::BufferManagerPtr bufferManager,
uint64_t  numTuplesPerBuffer 
)

◆ createExpectedBuffersFromCsvSpecificLines()

std::vector<Runtime::TupleBuffer> NES::TestUtils::createExpectedBuffersFromCsvSpecificLines ( const std::string &  csvFileName,
const SchemaPtr schema,
const Runtime::BufferManagerPtr bufferManager,
const int  fromLine,
const int  toLine,
bool  skipHeader = false,
uint64_t  numTuplesPerBuffer = 0,
const std::string &  delimiter = "," 
)

◆ createSourceTypeCSV()

CSVSourceTypePtr NES::TestUtils::createSourceTypeCSV ( const SourceTypeConfigCSV sourceTypeConfigCSV)

Creates a csv source that produces as many buffers as the csv file contains.

Parameters
SourceTypeConfigcontainer for configuration parameters of a source type.
Returns
CSVSourceTypePtr

References NES::TestUtils::SourceTypeConfigCSV::fileName, NES::TestUtils::SourceTypeConfigCSV::gatheringInterval, NES::TestUtils::SourceTypeConfigCSV::isSkipHeader, NES::TestUtils::SourceTypeConfigCSV::logicalSourceName, NES::TestUtils::SourceTypeConfigCSV::numberOfBuffersToProduce, NES::TestUtils::SourceTypeConfigCSV::numberOfTuplesToProduce, NES::TestUtils::SourceTypeConfigCSV::physicalSourceName, and sourceType().

Referenced by NES::Runtime::Execution::JoinDeploymentTest::runAndValidateJoinQueryTwoLogicalStreams(), NES::Runtime::Execution::MultipleJoinsTest::runJoinQuery(), and NES::UnionDeploymentTest::SetUp().

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

◆ createTestQueryCompiler()

QueryCompilation::QueryCompilerPtr NES::TestUtils::createTestQueryCompiler ( QueryCompilation::QueryCompilerOptionsPtr  options = QueryCompilation::QueryCompilerOptions::createDefaultOptions())
inline

utility method necessary if one wants to write a test that uses a mocked sink using a test sink descriptor

References NES::Compiler::CPPCompiler::create(), and NES::OperatorHandlerStore::create().

Referenced by TEST_F().

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

◆ createTestTupleBuffers()

std::vector< Runtime::MemoryLayouts::TestTupleBuffer > NES::TestUtils::createTestTupleBuffers ( std::vector< Runtime::TupleBuffer > &  buffers,
const SchemaPtr schema 
)

Converts all of the tuple buffers to dynamic tuple buffers.

Parameters
buffers
schema
Returns
Vector of TestTupleBuffer

References NES::Runtime::MemoryLayouts::TestTupleBuffer::createTestTupleBuffer().

Referenced by NES::TestHarness::getOutput(), NES::Runtime::Execution::JoinDeploymentTest::runAndValidateJoinQueryTwoLogicalStreams(), NES::Runtime::Execution::MultipleJoinsTest::runJoinQuery(), NES::FileSinkIntegrationTest::runQueryAndVerifyExpectedResults(), and NES::TEST_F().

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

◆ createVecFromPointer() [1/2]

template<typename T >
std::vector<T> NES::TestUtils::createVecFromPointer ( T *  startPtr,
T *  endPtr 
)
inline

Creates a vector for the memory [startPtr, endPtr].

Template Parameters
T
Parameters
startPtr
endPtr
Returns
Vector for the memory [startPtr, endPtr]

◆ createVecFromPointer() [2/2]

template<typename T >
std::vector<T> NES::TestUtils::createVecFromPointer ( T *  startPtr,
uint64_t  numItems 
)
inline

Creates a vector for the memory [startPtr, startPtr + numItems].

Template Parameters
T
Parameters
startPtr
numItems
Returns
Vector for the memory [startPtr, startPtr + numItems]

◆ createVecFromTupleBuffer()

template<typename T >
std::vector<T> NES::TestUtils::createVecFromTupleBuffer ( Runtime::TupleBuffer  buffer)
inline

Creates a vector for the memory that this tupleBuffer is responsible for.

Template Parameters
T
Parameters
startPtr
numItems
Returns
Vector

References NES::Runtime::TupleBuffer::getBuffer(), and NES::Runtime::TupleBuffer::getNumberOfTuples().

Here is the call graph for this function:

◆ csvSourceFilePath()

std::string NES::TestUtils::csvSourceFilePath ( std::string  filePath)

Creates the command line argument for the csv source file path.

Parameters
filePath
Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ dataPort()

std::string NES::TestUtils::dataPort ( uint64_t  dataPort)

Creates the command line argument for the data port.

Parameters
dataPort
Returns
Command line argument

Referenced by NES::CoordinatorRPCServer::RegisterWorker(), NES::NodeEngineTest::SetUp(), NES::NodeEngineTest::TearDown(), NES::TEST_F(), and NES::RequestProcessor::TEST_F().

Here is the caller graph for this function:

◆ disableDistributedWindowingOptimization()

std::string NES::TestUtils::disableDistributedWindowingOptimization ( )

◆ enableDebug()

std::string NES::TestUtils::enableDebug ( )

Creates the command line argument to enable debugging.

Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ enableMatrixJoin()

std::string NES::TestUtils::enableMatrixJoin ( )

Creates the command line argument for enabling matrix join.

Returns
Command line argument

◆ enableMonitoring()

std::string NES::TestUtils::enableMonitoring ( bool  prefix = false)

Creates the command line argument if to enable monitoring.

Parameters
prefix
Returns
Command line argument

References configOption().

Referenced by NES::TEST_F().

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

◆ enableNautilusCoordinator()

std::string NES::TestUtils::enableNautilusCoordinator ( )

Enables the usage of Nautilus at the coordinator.

Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ enableNautilusWorker()

std::string NES::TestUtils::enableNautilusWorker ( )

Enables the usage of Nautilus.

Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ enableNemoJoin()

std::string NES::TestUtils::enableNemoJoin ( )

Creates the command line argument for enabling nemo join.

Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ enableNemoPlacement()

std::string NES::TestUtils::enableNemoPlacement ( )

Creates the command line argument for enabling nemo placement.

Returns
Command line argument

◆ enableSlicingWindowing()

std::string NES::TestUtils::enableSlicingWindowing ( bool  prefix = false)

Creates the command line argument if to enable slicing windowing.

Parameters
prefix
Returns
Command line argument

References configOption().

Here is the call graph for this function:

◆ getExecutionPlan()

nlohmann::json NES::TestUtils::getExecutionPlan ( QueryId  queryId,
const std::string &  restPort 
)

This method is used for getting the execution plan via REST.

This method is used for stop a query.

Parameters
restport string
Returns
the execution plan
Parameters
queryIdId of the query
Returns
if stopped

References NES_DEBUG, restPort(), and NES::NESStrongType< T, Tag, invalid, initial >::toString().

Here is the call graph for this function:

◆ getPhysicalTypes()

std::vector< PhysicalTypePtr > NES::TestUtils::getPhysicalTypes ( const SchemaPtr schema)

References NES::DefaultPhysicalTypeFactory::getPhysicalType().

Referenced by NES::Util::createBuffersFromCSVFile(), createExpectedBufferFromStream(), and createExpectedBufferFromStreamSpecificLines().

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

◆ getTopology()

nlohmann::json NES::TestUtils::getTopology ( uint64_t  restPort)

This method is used for making a REST call to coordinator to get the topology as Json.

Parameters
1the rest port
Returns
the json

References NES_INFO, and restPort().

Referenced by NES::TEST_F().

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

◆ inputFormat()

std::string NES::TestUtils::inputFormat ( std::string  format)

Enables the usage of tcp socket input format.

Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ logicalSourceName()

std::string NES::TestUtils::logicalSourceName ( std::string  logicalSourceName)

Creates the command line argument for setting the logical source name.

Parameters
logicalSourceName
Returns
Command line argument

Referenced by NES::TestHarness::addLogicalSource(), NES::QueryReconfigurationTest::addLogicalSourceAndCreatePhysicalSourceType(), NES::TestHarness::attachWorkerWithMemorySourceToCoordinator(), NES::TestHarness::attachWorkerWithMemorySourceToWorkerWithId(), NES::SemanticQueryValidationTest::CallValidation(), NES::TestHarness::checkAndAddLogicalSources(), NES::RequestProcessor::AddKeyDistributionEntryEvent::create(), NES::TestHarness::createPhysicalSourceOfLambdaType(), NES::TestHarness::createPhysicalSourceOfMemoryType(), NES::createSimpleInputStream(), NES::Statistic::DefaultStatisticQueryGenerator::createStatisticQuery(), NES::REST::Controller::SourceCatalogController::ENDPOINT(), NES::RequestProcessor::AddKeyDistributionEntryEvent::getLogicalSourceName(), NES::RequestProcessor::RemoveLogicalSourceEvent::getLogicalSourceName(), NES::RequestProcessor::RemovePhysicalSourceEvent::getLogicalSourceName(), NES::Client::RemoteClient::getPhysicalSources(), NES::DataGeneratorMultiKey::getSource(), NES::DataGenerator::getSource(), NES::DataGeneratorMultiValue::getSource(), NES::RequestHandlerService::queueAddKeyDistributionEntryRequest(), NES::RequestHandlerService::queueRegisterLogicalSourceRequest(), NES::RequestHandlerService::queueUnregisterLogicalSourceRequest(), NES::RequestHandlerService::queueUnregisterPhysicalSourceRequest(), NES::RequestHandlerService::queueUpdateLogicalSourceRequest(), NES::Monitoring::MonitoringManager::registerLogicalMonitoringStreams(), NES::Runtime::Execution::MultipleJoinsTest::runJoinQuery(), NES::QueryReconfigurationTest::startWorkerWithLambdaSource(), NES::TEST_F(), NES::RequestProcessor::TEST_F(), TEST_F(), and NES::TEST_P().

Here is the caller graph for this function:

◆ makeMonitoringRestCall()

nlohmann::json NES::TestUtils::makeMonitoringRestCall ( const string &  restCall,
const std::string &  restPort = "8081" 
)

This method is used for making a monitoring rest call.

Parameters
1the rest call
2the rest port
Returns
the json

References NES_DEBUG, and restPort().

Referenced by NES::TEST_F(), and NES::MetricValidator::waitForMonitoringStreamsOrTimeout().

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

◆ monitoringWaitTime()

std::string NES::TestUtils::monitoringWaitTime ( uint64_t  monitoringWaitTime)

Creates the command line argument if to set monitoring wait time.

Parameters
prefix
Returns
Command line argument

◆ numberOfBuffersToProduce()

std::string NES::TestUtils::numberOfBuffersToProduce ( uint64_t  numberOfBuffersToProduce)

Creates the command line argument for setting the number of buffers to produce.

Parameters
numberOfBuffersToProduce
Returns
Command line argument

Referenced by NES::createDefaultDataSourceWithSchemaForVarBuffers(), NES::createLambdaSource(), NES::StatisticsIntegrationTest::createWorker(), NES::StatisticsIntegrationTest::SetUp(), and NES::TEST_F().

Here is the caller graph for this function:

◆ numberOfSlots()

std::string NES::TestUtils::numberOfSlots ( uint64_t  coordinatorPort,
bool  prefix = false 
)

Creates the command line argument for the numberOfSlots.

Parameters
coordinatorPort
prefix
Returns
Command line argument

References configOption(), and coordinatorPort().

Referenced by NES::RequestProcessor::TEST_F().

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

◆ numberOfTuplesToProducePerBuffer()

std::string NES::TestUtils::numberOfTuplesToProducePerBuffer ( uint64_t  numberOfTuplesToProducePerBuffer)

Creates the command line argument for the number of tuples of tuples to produce per buffer.

Parameters
numberOfTuplesToProducePerBuffer
Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ numGlobalBuffers()

std::string NES::TestUtils::numGlobalBuffers ( uint64_t  globalBuffers,
bool  prefix = false 
)

Creates the command line argument for the number of global buffers.

Parameters
globalBuffers
prefix
Returns
Command line argument

References configOption().

Here is the call graph for this function:

◆ numLocalBuffers()

std::string NES::TestUtils::numLocalBuffers ( uint64_t  localBuffers,
bool  prefix = false 
)

Creates the command line argument for the number of local buffers.

Parameters
localBuffers
prefix
Returns
Command line argument

References configOption().

Here is the call graph for this function:

◆ parentId()

std::string NES::TestUtils::parentId ( uint64_t  parentId)

Creates the command line argument for the parent id.

Parameters
parentId
Returns
Command line argument

Referenced by NES::TestHarness::attachWorkerToWorkerWithId(), NES::TestHarness::attachWorkerWithCSVSourceToWorkerWithId(), NES::TestHarness::attachWorkerWithMemorySourceToWorkerWithId(), NES::REST::Controller::TopologyController::ENDPOINT(), NES::CoordinatorRPCServer::GetParents(), and NES::TEST_F().

Here is the caller graph for this function:

◆ physicalSourceName()

std::string NES::TestUtils::physicalSourceName ( std::string  physicalSourceName)

Creates the command line argument for the physical source name.

Parameters
physicalSourceName
Returns
Command line argument

Referenced by NES::QueryReconfigurationTest::addLogicalSourceAndCreatePhysicalSourceType(), NES::TestHarness::attachWorkerWithMemorySourceToWorkerWithId(), NES::RequestProcessor::AddKeyDistributionEntryEvent::create(), NES::createBenchmarkSource(), NES::createBinaryFileSource(), NES::createCSVFileSource(), NES::DistributedMatrixJoinIntegrationTest::createCSVSourceType(), NES::DistributedNemoJoinIntegrationTest::createCSVSourceType(), NES::createDefaultDataSourceWithSchemaForOneBuffer(), NES::createDefaultDataSourceWithSchemaForVarBuffers(), NES::createDefaultSourceWithoutSchemaForOneBuffer(), NES::createLambdaSource(), NES::createMemorySource(), NES::createMonitoringSource(), NES::createNetworkSource(), NES::createSenseSource(), NES::createSimpleInputStream(), NES::Experimental::createStaticDataSource(), NES::createTCPSource(), NES::StatisticsIntegrationTest::createWorker(), NES::createZmqSource(), NES::RequestProcessor::AddKeyDistributionEntryEvent::getPhysicalSourceName(), NES::RequestProcessor::RemovePhysicalSourceEvent::getPhysicalSourceName(), NES::DataGeneratorMultiKey::getSource(), NES::DataGenerator::getSource(), NES::DataGeneratorMultiValue::getSource(), NES::RequestHandlerService::queueAddKeyDistributionEntryRequest(), NES::RequestHandlerService::queueUnregisterPhysicalSourceRequest(), NES::Runtime::Execution::MultipleJoinsTest::runJoinQuery(), NES::QueryReconfigurationTest::startWorker(), NES::QueryReconfigurationTest::startWorkerWithLambdaSource(), NES::TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ restPort()

◆ rpcPort()

std::string NES::TestUtils::rpcPort ( uint64_t  rpcPort)

Creates the command line argument for the rpc port.

Parameters
rpcPort
Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ setDistributedWindowChildThreshold()

std::string NES::TestUtils::setDistributedWindowChildThreshold ( uint64_t  val)

Creates the command line argument for setting the threshold of the distributed window child.

Parameters
val
Returns
Command line argument

◆ setDistributedWindowCombinerThreshold()

std::string NES::TestUtils::setDistributedWindowCombinerThreshold ( uint64_t  val)

Creates the command line argument for setting the threshold of the distributed window combiner.

Parameters
val
Returns
Command line argument

◆ sourceGatheringInterval()

std::string NES::TestUtils::sourceGatheringInterval ( uint64_t  sourceGatheringInterval)

Creates the command line argument for setting the source gathering interval.

Parameters
sourceGatheringInterval
Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ sourceType()

std::string NES::TestUtils::sourceType ( SourceType  sourceType)

Creates the command line argument for the source type.

Parameters
sourceType
Returns
Command line argument

References magic_enum::enum_name().

Referenced by NES::Monitoring::MonitoringAgent::addMonitoringStreams(), createSourceTypeCSV(), NES::MonitoringQueriesTest::runMetricsQueryTest(), NES::QueryReconfigurationTest::startWorker(), and NES::TEST_F().

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

◆ startCoordinator()

Util::Subprocess NES::TestUtils::startCoordinator ( std::initializer_list< std::string >  list)

start a new instance of a nes coordinator with a set of configuration flags

Parameters
flags
Returns
coordinator process, which terminates if it leaves the scope

References NES_ERROR, and NES_INFO.

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ startQueryViaRest()

nlohmann::json NES::TestUtils::startQueryViaRest ( const string &  queryString,
const std::string &  restPort = "8081" 
)

This method is used for executing a query.

Parameters
querystring
Returns
if stopped

References NES_DEBUG, and restPort().

Referenced by NES::TEST_F().

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

◆ startWorker()

Util::Subprocess NES::TestUtils::startWorker ( std::initializer_list< std::string >  flags)

start a new instance of a nes worker with a set of configuration flags

Parameters
flags
Returns
worker process, which terminates if it leaves the scope

References NES_ERROR, and NES_INFO.

Referenced by NES::QueryReconfigurationTest::startWorkerAsChildOf(), and NES::TEST_F().

Here is the caller graph for this function:

◆ startWorkerPtr()

std::shared_ptr< Util::Subprocess > NES::TestUtils::startWorkerPtr ( std::initializer_list< std::string >  flags)

start a new instance of a nes worker with a set of configuration flags

Parameters
flags
Returns
worker process, which terminates if it leaves the scope

References NES_INFO.

◆ stopQueryViaRest()

bool NES::TestUtils::stopQueryViaRest ( QueryId  queryId,
const std::string &  restPort = "8081" 
)

This method is used for stop a query.

Parameters
queryIdId of the query
Returns
if stopped

References NES_DEBUG, restPort(), and NES::NESStrongType< T, Tag, invalid, initial >::toString().

Here is the call graph for this function:

◆ tcpSocketBufferSize()

std::string NES::TestUtils::tcpSocketBufferSize ( std::string  bufferSize)

Enables the usage of tcp socket decided message size.

Returns
Command line argument

References NES::bufferSize.

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ tcpSocketDecidedMessageSize()

std::string NES::TestUtils::tcpSocketDecidedMessageSize ( std::string  decidedSize)

Enables the usage of tcp socket decided message size.

Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ tcpSocketHost()

std::string NES::TestUtils::tcpSocketHost ( std::string  host)

Enables the usage of tcp socket host.

Returns
Command line argument

References host.

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ tcpSocketPersistentSource()

std::string NES::TestUtils::tcpSocketPersistentSource ( std::string  persistentSource)

Enables the usage of tcp socket persistent source.

Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ tcpSocketPort()

std::string NES::TestUtils::tcpSocketPort ( std::string  port)

Enables the usage of tcp socket port.

Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ waitForQueryToStart()

bool NES::TestUtils::waitForQueryToStart ( QueryId  queryId,
const Catalogs::Query::QueryCatalogPtr queryCatalog,
std::chrono::seconds  timeoutInSec = std::chrono::seconds(defaultStartQueryTimeout) 
)

This method is used for waiting till the query gets into running status or a timeout occurs.

Parameters
queryId: the query id to check for
queryCatalogthe catalog to look into for status change
timeoutInSectime to wait before stop checking
Returns
true if query gets into running status else false

References magic_enum::enum_name(), NES::FAILED, NES::MARKED_FOR_HARD_STOP, NES::MARKED_FOR_SOFT_STOP, NES_ERROR, NES_TRACE, NES_WARNING, NES::RUNNING, NES::SOFT_STOP_COMPLETED, NES::SOFT_STOP_TRIGGERED, and NES::STOPPED.

Referenced by NES::MonitoringQueriesTest::runMetricsQueryTest(), NES::TestHarness::runQuery(), and NES::TEST_F().

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

◆ waitForWorkers()

bool NES::TestUtils::waitForWorkers ( uint64_t  restPort,
uint16_t  maxTimeout,
uint16_t  expectedWorkers 
)

References NES_ASSERT2_FMT, NES_DEBUG, NES_ERROR, NES_INFO, and restPort().

Referenced by NES::RemoteClientTest::SetUp(), NES::LocationControllerIntegrationTest::startCoordinator(), and NES::TEST_F().

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

◆ workerConfigPath()

std::string NES::TestUtils::workerConfigPath ( const std::string &  filename)

Creates the command line argument for the worker config path.

Parameters
filename
Returns
Command line argument

Referenced by main().

Here is the caller graph for this function:

◆ workerHealthCheckWaitTime()

std::string NES::TestUtils::workerHealthCheckWaitTime ( uint64_t  workerWaitTime)

Creates the command line argument for setting the health check wait time for the worker.

Parameters
workerWaitTime
Returns
Command line argument

Referenced by NES::TEST_F().

Here is the caller graph for this function: