ifw-daq  3.0.1
IFW Data Acquisition modules
Classes | Functions
testManager.cpp File Reference

daq::ManagerImpl tests More...

#include <daq/manager.hpp>
#include <fmt/ostream.h>
#include <regex>
#include "mock/daqController.hpp"
#include "mock/dpmClientMock.hpp"
#include "mock/mockWorkspace.hpp"
#include "statusObserver.hpp"
#include "utils.hpp"
#include <gtest/gtest.h>
#include <log4cplus/loggingmacros.h>
#include <daq/error/report.hpp>

Go to the source code of this file.

Classes

struct  FixtureBase
 
class  TestManagerImplLifecycle
 
class  TestManagerImpl
 

Functions

 TEST_F (TestManagerImplLifecycle, AddDaqNotifiesObserver)
 
 TEST_F (TestManagerImplLifecycle, AwaitStateCompletesWithAbandonedManager)
 
 TEST_F (TestManagerImpl, MakeId)
 
 TEST_F (TestManagerImpl, StartDaqWithSameIdThrowsInvalidArgument)
 
 TEST_F (TestManagerImpl, StartDaqAsyncStartsDaq)
 
 TEST_F (TestManagerImpl, StartDaqAbortsIfDaqControllerFails)
 Tests the behaviour that if DaqController::StartAsync() fails it should automatically force-abort the acquisition. More...
 
 TEST_F (TestManagerImpl, StopNonexistingDaqThrowsInvalidArgument)
 
 TEST_F (TestManagerImpl, StopDaqAsyncStopsDaq)
 
 TEST_F (TestManagerImpl, AbortNonexistingDaqThrowsInvalidArgumentEvenIfTolerant)
 
 TEST_F (TestManagerImpl, AbortDaqAsyncAbortsDaq)
 
 TEST_F (TestManagerImpl, UpdateKeywordsUpdatesKeywords)
 
 TEST_F (TestManagerImpl, UpdateKeywordsForNonexistingDaqThrowsInvalidArgument)
 
 TEST_F (TestManagerImpl, GetStatus)
 
 TEST_F (TestManagerImpl, GetStatusThrowsIfDaqDoesNotExist)
 
 TEST_F (TestManagerImpl, GetStatusReturnsArchivedStatus)
 
 TEST_F (TestManagerImpl, AwaitDaqStateWorksForCompletedArchivedDaqs)
 
 TEST_F (TestManagerImpl, AwaitDaqStateReturnsExceptionalFutureForIncompleteArchivedDaqs)
 
 TEST_F (TestManagerImpl, AwaitDaqStateReturnsReadyFutureIfConditionIsFulfilled)
 
 TEST_F (TestManagerImpl, AwaitDaqStateIsReadyWhenConditionIsFulfilled)
 
 TEST_F (TestManagerImpl, AwaitDaqStateIsReadyWhenItTimesout)
 
 TEST_F (TestManagerImpl, StoppedDaqTransitionsToNotScheduledAndIsScheduledThenCompleted)
 
 TEST_F (TestManagerImpl, RestoreFromWorkspaceAddsDaq)
 
 TEST_F (TestManagerImpl, RestoreFromWorkspaceArchivesStaleDaqs)
 
 TEST_F (TestManagerImpl, RestoreFromWorkspaceSkipsMissingDaq)
 
 TEST_F (TestManagerImpl, RestoreFromWorkspaceIgnoresArchiveFailure)
 
 TEST_F (TestManagerImpl, ContextSignalUpdatesWorkspace)
 

Detailed Description

daq::ManagerImpl tests

Definition in file testManager.cpp.

Function Documentation

◆ TEST_F() [1/26]

TEST_F ( TestManagerImpl  ,
AbortDaqAsyncAbortsDaq   
)

Definition at line 384 of file testManager.cpp.

◆ TEST_F() [2/26]

TEST_F ( TestManagerImpl  ,
AbortNonexistingDaqThrowsInvalidArgumentEvenIfTolerant   
)

Definition at line 378 of file testManager.cpp.

◆ TEST_F() [3/26]

TEST_F ( TestManagerImpl  ,
AwaitDaqStateIsReadyWhenConditionIsFulfilled   
)

Definition at line 480 of file testManager.cpp.

◆ TEST_F() [4/26]

TEST_F ( TestManagerImpl  ,
AwaitDaqStateIsReadyWhenItTimesout   
)

Definition at line 494 of file testManager.cpp.

◆ TEST_F() [5/26]

TEST_F ( TestManagerImpl  ,
AwaitDaqStateReturnsExceptionalFutureForIncompleteArchivedDaqs   
)

Definition at line 457 of file testManager.cpp.

◆ TEST_F() [6/26]

TEST_F ( TestManagerImpl  ,
AwaitDaqStateReturnsReadyFutureIfConditionIsFulfilled   
)

Definition at line 468 of file testManager.cpp.

◆ TEST_F() [7/26]

TEST_F ( TestManagerImpl  ,
AwaitDaqStateWorksForCompletedArchivedDaqs   
)

Definition at line 444 of file testManager.cpp.

◆ TEST_F() [8/26]

TEST_F ( TestManagerImpl  ,
ContextSignalUpdatesWorkspace   
)

Definition at line 683 of file testManager.cpp.

◆ TEST_F() [9/26]

TEST_F ( TestManagerImpl  ,
GetStatus   
)

Definition at line 420 of file testManager.cpp.

◆ TEST_F() [10/26]

TEST_F ( TestManagerImpl  ,
GetStatusReturnsArchivedStatus   
)

Definition at line 437 of file testManager.cpp.

◆ TEST_F() [11/26]

TEST_F ( TestManagerImpl  ,
GetStatusThrowsIfDaqDoesNotExist   
)

Definition at line 431 of file testManager.cpp.

◆ TEST_F() [12/26]

TEST_F ( TestManagerImpl  ,
MakeId   
)

Definition at line 273 of file testManager.cpp.

◆ TEST_F() [13/26]

TEST_F ( TestManagerImpl  ,
RestoreFromWorkspaceAddsDaq   
)

Definition at line 556 of file testManager.cpp.

◆ TEST_F() [14/26]

TEST_F ( TestManagerImpl  ,
RestoreFromWorkspaceArchivesStaleDaqs   
)

Definition at line 587 of file testManager.cpp.

◆ TEST_F() [15/26]

TEST_F ( TestManagerImpl  ,
RestoreFromWorkspaceIgnoresArchiveFailure   
)

Definition at line 649 of file testManager.cpp.

◆ TEST_F() [16/26]

TEST_F ( TestManagerImpl  ,
RestoreFromWorkspaceSkipsMissingDaq   
)

Definition at line 616 of file testManager.cpp.

◆ TEST_F() [17/26]

TEST_F ( TestManagerImpl  ,
StartDaqAbortsIfDaqControllerFails   
)

Tests the behaviour that if DaqController::StartAsync() fails it should automatically force-abort the acquisition.

This is mainly done because putting that responsibility on the user is not productive.

note: This behaviour can be made configurable.

Definition at line 331 of file testManager.cpp.

◆ TEST_F() [18/26]

TEST_F ( TestManagerImpl  ,
StartDaqAsyncStartsDaq   
)

Definition at line 309 of file testManager.cpp.

◆ TEST_F() [19/26]

TEST_F ( TestManagerImpl  ,
StartDaqWithSameIdThrowsInvalidArgument   
)

Definition at line 292 of file testManager.cpp.

◆ TEST_F() [20/26]

TEST_F ( TestManagerImpl  ,
StopDaqAsyncStopsDaq   
)

Definition at line 362 of file testManager.cpp.

◆ TEST_F() [21/26]

TEST_F ( TestManagerImpl  ,
StopNonexistingDaqThrowsInvalidArgument   
)

Definition at line 356 of file testManager.cpp.

◆ TEST_F() [22/26]

TEST_F ( TestManagerImpl  ,
StoppedDaqTransitionsToNotScheduledAndIsScheduledThenCompleted   
)

Definition at line 507 of file testManager.cpp.

◆ TEST_F() [23/26]

TEST_F ( TestManagerImpl  ,
UpdateKeywordsForNonexistingDaqThrowsInvalidArgument   
)

Definition at line 413 of file testManager.cpp.

◆ TEST_F() [24/26]

TEST_F ( TestManagerImpl  ,
UpdateKeywordsUpdatesKeywords   
)

Definition at line 400 of file testManager.cpp.

◆ TEST_F() [25/26]

TEST_F ( TestManagerImplLifecycle  ,
AddDaqNotifiesObserver   
)

Definition at line 179 of file testManager.cpp.

◆ TEST_F() [26/26]

TEST_F ( TestManagerImplLifecycle  ,
AwaitStateCompletesWithAbandonedManager   
)

Definition at line 224 of file testManager.cpp.