(file) Return to TestStressTestClient.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / test / StressTestClients

Diff for /pegasus/test/StressTestClients/TestStressTestClient.cpp between version 1.1.2.2 and 1.1.2.3

version 1.1.2.2, 2006/04/24 19:29:05 version 1.1.2.3, 2006/04/27 16:11:32
Line 87 
Line 87 
     optionCount = sizeof(testOptionsTable) / sizeof(testOptionsTable[0]);     optionCount = sizeof(testOptionsTable) / sizeof(testOptionsTable[0]);
     optionsTable = testOptionsTable;     optionsTable = testOptionsTable;
  }  }
 /*///////////////////////////////////////////////////////////////  /**
     OPTION MANAGEMENT     OPTION MANAGEMENT
 ///////////////////////////////////////////////////////////////*/  */
  
 /** GetOptions function - This function sets up the options from /** GetOptions function - This function sets up the options from
     testOptionsTable which is initialized through constructor     testOptionsTable which is initialized through constructor
Line 113 
Line 113 
     int counter = 0;     int counter = 0;
     String argument = String::EMPTY;     String argument = String::EMPTY;
  
     /** om.registerOptions(newOptionsTable, (const)cOptionCount); */  
       //
       // om.registerOptions(newOptionsTable, (const)cOptionCount);
       //
     om.registerOptions(newOptionsTable, cOptionCount);     om.registerOptions(newOptionsTable, cOptionCount);
     argvv = argv;     argvv = argv;
  
     /** Following section is introduced to ignore  options not      //
         required by a client.      // Following section is introduced to ignore  options not
     */      // required by a client.
       //
     for (int i = 1; i < argc; i++)     for (int i = 1; i < argc; i++)
     {     {
         argument = String::EMPTY;         argument = String::EMPTY;
         const char* arg = argv[i];         const char* arg = argv[i];
  
         /** Check for - option. */          //
           // Check for - option.
           //
         if (*arg == '-')         if (*arg == '-')
         {         {
             /** Look for the option. */              //
               // Look for the option.
               //
             argument.append(arg + 1);             argument.append(arg + 1);
             const Option* option = om.lookupOption(argument);             const Option* option = om.lookupOption(argument);
  
             /** Get the option argument if any. */              //
               // Get the option argument if any.
               //
             if (option)             if (option)
             {             {
                 argvv[++counter]=argv[i];                 argvv[++counter]=argv[i];
Line 206 
Line 216 
  
     Uint32 whileCount = 0;     Uint32 whileCount = 0;
  
     /**  Get current time for time stamp */      //
       //  Get current time for time stamp
       //
     nowMilliseconds = TimeValue::getCurrentTime().toMilliseconds();     nowMilliseconds = TimeValue::getCurrentTime().toMilliseconds();
  
     sprintf(pid_str, "%d", clientPid);     sprintf(pid_str, "%d", clientPid);
Line 312 
Line 324 
     successPercentage = (successCount/totalCount)*100;     successPercentage = (successCount/totalCount)*100;
     errorPercentage = 100 - successPercentage;     errorPercentage = 100 - successPercentage;
  
     /** loging details here  */      //
       // loging details here
       //
     ofstream errorLog_File(clientLog.getCString(), ios::app);     ofstream errorLog_File(clientLog.getCString(), ios::app);
     errorLog_File<<client<<" PID#"<<clientPid<<" ran "<<totalCount     errorLog_File<<client<<" PID#"<<clientPid<<" ran "<<totalCount
                  <<" times with a "<<errorPercentage<<"% failure"<<"\n";                  <<" times with a "<<errorPercentage<<"% failure"<<"\n";
Line 327 
Line 341 
     String &clientLog,     String &clientLog,
     String &message)     String &message)
 { {
     /** loging details here .*/      //
       // loging details here .
       //
     ofstream errorLog_File(clientLog.getCString(), ios::app);     ofstream errorLog_File(clientLog.getCString(), ios::app);
     errorLog_File<<" PID#"<<clientPid<<"::"<<message<<"\n";     errorLog_File<<" PID#"<<clientPid<<"::"<<message<<"\n";
     errorLog_File.close();     errorLog_File.close();
Line 336 
Line 352 
 /** This method handles the SSLCertificate verification part. */ /** This method handles the SSLCertificate verification part. */
 static Boolean verifyCertificate(SSLCertificateInfo &certInfo) static Boolean verifyCertificate(SSLCertificateInfo &certInfo)
 { {
     /** Add code to handle server certificate verification. */      //
       // Add code to handle server certificate verification.
       //
     return true;     return true;
 } }
  
Line 357 
Line 375 
 { {
     if (useSSL)     if (useSSL)
     {     {
         /** Get environment variables. */          //
           // Get environment variables.
           //
         const char* pegasusHome = getenv("PEGASUS_HOME");         const char* pegasusHome = getenv("PEGASUS_HOME");
  
         String trustpath = FileSystem::getAbsolutePath(         String trustpath = FileSystem::getAbsolutePath(
Line 375 
Line 395 
             trustpath, verifyCertificate, randFile);             trustpath, verifyCertificate, randFile);
         if (verboseTest)         if (verboseTest)
         {         {
             PEGASUS_STD(cout) << "connecting to " << host << ":"              cout << "connecting to " << host << ":"
                               << portNumber << " using SSL"                               << portNumber << " using SSL"
                               << PEGASUS_STD(endl);                   << endl;
         }         }
         client->connect (host, portNumber, sslContext, userName, password);         client->connect (host, portNumber, sslContext, userName, password);
     } /* useSSL. */     } /* useSSL. */
Line 385 
Line 405 
     {     {
         if (verboseTest)         if (verboseTest)
         {         {
             PEGASUS_STD(cout) << "Connecting to " << host << ":" << portNumber              cout << "Connecting to " << host << ":" << portNumber
                               << PEGASUS_STD(endl);                   << endl;
         }         }
         client->connect (host, portNumber, userName, password);         client->connect (host, portNumber, userName, password);
     }     }
     if (verboseTest)     if (verboseTest)
     {     {
         PEGASUS_STD(cout) << "Client Connected" << PEGASUS_STD(endl);          cout << "Client Connected" << endl;
     }     }
 } }


Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2