ATLAS Offline Software
ParallelCallTest.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TestTools_ParallelCallTest_h
6 #define TestTools_ParallelCallTest_h
7 
8 #include <cstddef>
9 #include <initializer_list>
10 #include <vector>
31 public:
32  virtual ~ParallelCallTest() {}
38  bool run( size_t nrepeats );
43  virtual void firstCall() = 0;
44 
50  virtual bool callAndCompare() const = 0;
51 
58  // static bool launchTests( size_t nrepeats, std::initializer_list<ParallelCallTest*> tests );
59  static bool launchTests( size_t nrepeats, const std::vector<ParallelCallTest*>& tests );
60 };
61 #endif
ParallelCallTest
Provides interface and helper functions to perform stress testing of the thread-safe code.
Definition: ParallelCallTest.h:30
ParallelCallTest::firstCall
virtual void firstCall()=0
a method that will be called to obtain first results from the service It should set the reference qua...
python.setupRTTAlg.tests
list tests
Definition: setupRTTAlg.py:40
ParallelCallTest::callAndCompare
virtual bool callAndCompare() const =0
a function that performs request, and compares the results obtained with the result of the first exec...
ParallelCallTest::~ParallelCallTest
virtual ~ParallelCallTest()
Definition: ParallelCallTest.h:32
ParallelCallTest::launchTests
static bool launchTests(size_t nrepeats, const std::vector< ParallelCallTest * > &tests)
Method to run launch number of tests in parallel (increasing the stress of the calle) It has a potent...
Definition: ParallelCallTest.cxx:83
ParallelCallTest::run
bool run(size_t nrepeats)
runs the stress test by invoking it the firstCall and then repetitively the callAndCompare
Definition: ParallelCallTest.cxx:69