Back to index

salome-kernel  6.5.0
Public Member Functions | Private Member Functions
SALOMETraceCollectorTest Class Reference

#include <SALOMETraceCollectorTest.hxx>

List of all members.

Public Member Functions

void setUp ()
void tearDown ()
void testLoadBufferPoolCORBA ()
 open a trace on a CORBA, multithread writing on file, close

Private Member Functions

 CPPUNIT_TEST_SUITE (SALOMETraceCollectorTest)
 CPPUNIT_TEST (testLoadBufferPoolCORBA)
 CPPUNIT_TEST_SUITE_END ()

Detailed Description

Definition at line 28 of file SALOMETraceCollectorTest.hxx.


Member Function Documentation

Definition at line 40 of file SALOMETraceCollectorTest.cxx.

{
}

Definition at line 51 of file SALOMETraceCollectorTest.cxx.

{
}

open a trace on a CORBA, multithread writing on file, close

Definition at line 66 of file SALOMETraceCollectorTest.cxx.

{
  std::string s = "with_logger";
  CPPUNIT_ASSERT(! setenv("SALOME_trace",s.c_str(),1)); // 1: overwrite

  // --- NUM_THREADS thread creation for trace generation.

  pthread_t threads[NUM_THREADS];
  int rc, t;
  for(t=0;t<NUM_THREADS;t++)
    {
      MESSAGE("Creating thread " << t);
      rc = pthread_create(&threads[t], NULL, PrintHello, &t) ;
      CPPUNIT_ASSERT( !rc);
    }

  // --- wait for end of each thread producing trace.

  for(t=0;t<NUM_THREADS;t++)
    {
      pthread_join(threads[t], NULL);
      MESSAGE("--------------------- end of PrintHello thread " << t);
    }
  MESSAGE(" ---- end of PrintHello threads ---- ");

  LocalTraceBufferPool* bp1 = LocalTraceBufferPool::instance();
  CPPUNIT_ASSERT(bp1);
  bp1->deleteInstance(bp1);
}

Here is the call graph for this function:


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