axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whitl...@apache.org
Subject cvs commit: ws-axis/c/tests/auto_build/testcases/handlers/handler_test4/testhandler THandler.cpp
Date Fri, 25 Feb 2005 15:28:17 GMT
whitlock    2005/02/25 07:28:17

  Modified:    c/src/engine DeserializerPool.cpp
               c/tests/auto_build/testcases/handlers/handler_test4/testhandler
                        THandler.cpp
  Log:
  AXISCPP-479 HandlerTest4 fails on AIX. This is not a fix to this JIRA. Instead this test
fails intermittently on AIX. I cannot reproduce this problem myself, although it regularly
fails during the overnight build. It fails in ~DeserializerPool immediately after it has deleted
the last (and only) IWrapperSoapDeSerializer. It is not clear to me why this is happening.
Consequently I am adding in extra trace into DeserializerPool and making the code more defensive.
Also I have removed some unnecessary casts in the testcase. I hope that if the test continues
to fail, I will be able to diagnose the problem from the extra trace.
  
  Revision  Changes    Path
  1.17      +27 -5     ws-axis/c/src/engine/DeserializerPool.cpp
  
  Index: DeserializerPool.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/DeserializerPool.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- DeserializerPool.cpp	19 Nov 2004 16:22:06 -0000	1.16
  +++ DeserializerPool.cpp	25 Feb 2005 15:28:17 -0000	1.17
  @@ -27,18 +27,40 @@
   using namespace std;
   
   
  -DeserializerPool::DeserializerPool ()
  +DeserializerPool::DeserializerPool()
   {
  -
  +	m_DZList.clear();
   }
   
  +/*
  + * ~DeserializerPool sometimes fails on AIX, so this method has been
  + * recoded to make it more defensive and added extra trace. It fails
  + * intermittently and the last line in the trace shows the exit of
  + * the last ~SoapSerializer().
  + * 
  + * 
  + */
   DeserializerPool::~DeserializerPool ()
   {
  -    for (list < IWrapperSoapDeSerializer* >::iterator it = m_DZList.begin ();
  -        it != m_DZList.end (); it++)
  +    list<IWrapperSoapDeSerializer*>::iterator it = m_DZList.begin();
  +	while (it != m_DZList.end())
       {
  -        delete (*it);
  +		IWrapperSoapDeSerializer *dz = *it;
  +
  +#ifdef ENABLE_AXISTRACE
  +		if (AxisTrace::isTraceOn()) 
  +		{
  +			char text[256];
  +			sprintf(text, "~DeserializerPool<%p> dz=%p", this, dz);
  +			AxisTrace::traceLine(text);
  +		}
  +#endif
  +
  +		if (NULL != dz)
  +	        delete dz;
  +		it++;
       }
  +	m_DZList.clear();
   }
   
   int DeserializerPool::getInstance (IWrapperSoapDeSerializer** ppDZ)
  
  
  
  1.3       +2 -2      ws-axis/c/tests/auto_build/testcases/handlers/handler_test4/testhandler/THandler.cpp
  
  Index: THandler.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/handlers/handler_test4/testhandler/THandler.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- THandler.cpp	9 Feb 2005 11:34:52 -0000	1.2
  +++ THandler.cpp	25 Feb 2005 15:28:17 -0000	1.3
  @@ -79,7 +79,7 @@
   		pIHeaderBlock->setLocalName("getuser");
   		pIHeaderBlock->setURI("http://test.axiscpp.apache.org/testheader");
   
  -		string pachHeaderVal = (string)pIMsg->getUserName();
  +		string &pachHeaderVal = pIMsg->getUserName();
   		BasicNode* pBasicNode = pIHeaderBlock->createChild(CHARACTER_NODE);
   		pBasicNode->setValue(pachHeaderVal.c_str());
   		pIHeaderBlock->addChild(pBasicNode);
  @@ -90,7 +90,7 @@
   
   		string new_name = "Elvis";
   		pIMsg->setUserName(new_name);
  -		pachHeaderVal = (string)pIMsg->getUserName();
  +		pachHeaderVal = pIMsg->getUserName();
   		pBasicNode = pIHeaderBlock->createChild(CHARACTER_NODE);
   		pBasicNode->setValue(pachHeaderVal.c_str());
   		pIHeaderBlock->addChild(pBasicNode);
  
  
  

Mime
View raw message