Back to index

nordugrid-arc-nox  1.1.0~rc6
Classes | Public Member Functions | Private Member Functions | Private Attributes
BrokerTest Class Reference
Collaboration diagram for BrokerTest:
Collaboration graph
[legend]

List of all members.

Classes

class  TestBroker

Public Member Functions

 BrokerTest ()
void setUp ()
void tearDown ()
void CPUWallTimeTest ()
void BenckmarkCPUWallTimeTest ()

Private Member Functions

 CPPUNIT_TEST_SUITE (BrokerTest)
 CPPUNIT_TEST (CPUWallTimeTest)
 CPPUNIT_TEST (BenckmarkCPUWallTimeTest)
 CPPUNIT_TEST_SUITE_END ()

Private Attributes

Arc::LogStream logcerr
Arc::Logger logger
const Arc::UserConfig usercfg
TestBroker tb
std::list< Arc::ExecutionTargetetl
Arc::JobDescription job

Detailed Description

Definition at line 17 of file BrokerTest.cpp.


Constructor & Destructor Documentation


Member Function Documentation

Definition at line 86 of file BrokerTest.cpp.

                                          {
  etl.front().Benchmarks["TestBenchmark"] = 100.;

  job.Resources.TotalCPUTime.benchmark = std::pair<std::string, double>("TestBenchmark", 50.);
  etl.front().MaxCPUTime = 100;
  job.Resources.TotalCPUTime.range.max = 210; CPPASSERT(0)
  job.Resources.TotalCPUTime.range.max = 200; CPPASSERT(1)
  job.Resources.TotalCPUTime.range.max = 190;  CPPASSERT(1)

  etl.front().MinCPUTime = 10;
  job.Resources.TotalCPUTime.range.min = 10; CPPASSERT(0)
  job.Resources.TotalCPUTime.range.min = 20; CPPASSERT(1)
  job.Resources.TotalCPUTime.range.min = 30; CPPASSERT(1)

  job.Resources.TotalWallTime.benchmark = std::pair<std::string, double>("TestBenchmark", 50.);
  etl.front().MaxWallTime = 100;
  job.Resources.TotalWallTime.range.max = 210; CPPASSERT(0)
  job.Resources.TotalWallTime.range.max = 200; CPPASSERT(1)
  job.Resources.TotalWallTime.range.max = 190;  CPPASSERT(1)

  etl.front().MinWallTime = 10;
  job.Resources.TotalWallTime.range.min = 10;  CPPASSERT(0)
  job.Resources.TotalWallTime.range.min = 20; CPPASSERT(1)
  job.Resources.TotalWallTime.range.min = 30; CPPASSERT(1)

  etl.front().CPUClockSpeed = 2500;
  job.Resources.TotalCPUTime.benchmark = std::pair<std::string, double>("ARC-clockrate", 1000.);
  etl.front().MaxCPUTime = 100;
  job.Resources.TotalCPUTime.range.max = 300; CPPASSERT(0)
  job.Resources.TotalCPUTime.range.max = 250; CPPASSERT(1)
  job.Resources.TotalCPUTime.range.max = 200;  CPPASSERT(1)

  etl.front().Benchmarks.erase("ARC-clockrate");
  etl.front().CPUClockSpeed = 5600;
  etl.front().MaxCPUTime = 200;
  job.Resources.TotalCPUTime.range.max = -1;
  job.Resources.TotalCPUTime.benchmark = std::pair<std::string, double>("", -1);
  std::string xrsl = "&(executable=/bin/echo)(gridtime=600s)";
  CPPUNIT_ASSERT(job.Parse(xrsl)); CPPASSERT(0)
  xrsl = "&(executable=/bin/echo)(gridtime=400s)";
  CPPUNIT_ASSERT(job.Parse(xrsl)); CPPASSERT(1)
  xrsl = "&(executable=/bin/echo)(gridtime=200s)";
  CPPUNIT_ASSERT(job.Parse(xrsl)); CPPASSERT(1)
}

Here is the call graph for this function:

Definition at line 64 of file BrokerTest.cpp.

                                 {
  etl.front().MaxCPUTime = 100;
  job.Resources.TotalCPUTime.range.max = 110; CPPASSERT(0)
  job.Resources.TotalCPUTime.range.max = 100; CPPASSERT(1)
  job.Resources.TotalCPUTime.range.max = 90;  CPPASSERT(1)

  etl.front().MinCPUTime = 10;
  job.Resources.TotalCPUTime.range.min = 5; CPPASSERT(0)
  job.Resources.TotalCPUTime.range.min = 10; CPPASSERT(1)
  job.Resources.TotalCPUTime.range.min = 15; CPPASSERT(1)

  etl.front().MaxWallTime = 100;
  job.Resources.TotalWallTime.range.max = 110; CPPASSERT(0)
  job.Resources.TotalWallTime.range.max = 100; CPPASSERT(1)
  job.Resources.TotalWallTime.range.max = 90;  CPPASSERT(1)

  etl.front().MinWallTime = 10;
  job.Resources.TotalWallTime.range.min = 5;  CPPASSERT(0)
  job.Resources.TotalWallTime.range.min = 10; CPPASSERT(1)
  job.Resources.TotalWallTime.range.min = 15; CPPASSERT(1)
}

Definition at line 57 of file BrokerTest.cpp.

                       {
  etl.front().url = Arc::URL("http://localhost/test");
  etl.front().HealthState = "ok";
}

Definition at line 62 of file BrokerTest.cpp.

{}

Member Data Documentation

std::list<Arc::ExecutionTarget> BrokerTest::etl [private]

Definition at line 46 of file BrokerTest.cpp.

Definition at line 47 of file BrokerTest.cpp.

Definition at line 42 of file BrokerTest.cpp.

Definition at line 43 of file BrokerTest.cpp.

Definition at line 45 of file BrokerTest.cpp.

Definition at line 44 of file BrokerTest.cpp.


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