Author: ips
Date: Wed Mar 30 07:57:56 2005
New Revision: 159488
URL: http://svn.apache.org/viewcvs?view=rev&rev=159488
Log:
metric metadata attribs are now validated
Modified:
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java
Modified:
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java?view=diff&r1=159487&r2=159488
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java
(original)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java
Wed Mar 30 07:57:56 2005
@@ -15,6 +15,7 @@
*=============================================================================*/
package org.apache.ws.muws.interop.client;
+import org.apache.ws.addressing.XmlBeansEndpointReference;
import org.apache.ws.mows.v1_0.capability.EndpointIdentificationCapability;
import org.apache.ws.mows.v1_0.capability.EndpointMetricsCapability;
import org.apache.ws.mows.v1_0.capability.RequestProcessingStateCapability;
@@ -25,21 +26,19 @@
import org.apache.ws.muws.v1_0.capability.MetricsCapability;
import org.apache.ws.muws.v1_0.capability.RelationshipsCapability;
import org.apache.ws.util.XmlBeanUtils;
-import org.apache.ws.addressing.XmlBeansEndpointReference;
import org.apache.xmlbeans.XmlAnyURI;
import org.apache.xmlbeans.XmlDateTime;
import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlQName;
import org.apache.xmlbeans.XmlPositiveInteger;
+import org.apache.xmlbeans.XmlQName;
import
org.everestWeather.wsdm.samples.x2005.x04.schema.WeatherstationPropertyQNames;
import org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric;
import
org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.EndpointDescriptionsDocument;
import org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.IntegerCounter;
import
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.CorrelatablePropertiesType;
-import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipType;
import
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipParticipantType;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipType;
import org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument;
-import org.xmlsoap.schemas.ws.x2003.x03.addressing.ReferencePropertiesType;
import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
import javax.wsdl.Definition;
@@ -139,20 +138,31 @@
assertTrue( numRequestsPropElem instanceof IntegerCounter );
IntegerCounter numRequestsMetric =
((IntegerCounter)numRequestsPropElem);
long numRequests = numRequestsMetric.getBigIntegerValue().longValue();
+ assertTrue( "ResetAt metadata attribute is not set",
numRequestsMetric.isSetResetAt() );
+ assertFalse( "Duration metadata attribute is set",
numRequestsMetric.isSetDuration() );
XmlObject numFailedRequestsPropElem = getSingleProperty( m_resource,
EndpointMetricsCapability.PROP_NAME_NUMBER_OF_FAILED_REQUESTS );
assertTrue( numFailedRequestsPropElem instanceof IntegerCounter );
- long numFailedRequests =
((IntegerCounter)numFailedRequestsPropElem).getBigIntegerValue().longValue();
+ IntegerCounter numFailedRequestsMetric =
((IntegerCounter)numFailedRequestsPropElem);
+ long numFailedRequests =
numFailedRequestsMetric.getBigIntegerValue().longValue();
+ assertTrue( "ResetAt metadata attribute is not set",
numFailedRequestsMetric.isSetResetAt() );
+ assertFalse( "Duration metadata attribute is set",
numFailedRequestsMetric.isSetDuration() );
XmlObject numSuccessfulRequestsPropElem = getSingleProperty(
m_resource, EndpointMetricsCapability.PROP_NAME_NUMBER_OF_SUCCESSFUL_REQUESTS );
assertTrue( numSuccessfulRequestsPropElem instanceof IntegerCounter );
- long numSuccessfulRequests =
((IntegerCounter)numSuccessfulRequestsPropElem).getBigIntegerValue().longValue();
+ IntegerCounter numSuccessfulRequestsMetric =
((IntegerCounter)numSuccessfulRequestsPropElem);
+ long numSuccessfulRequests =
numSuccessfulRequestsMetric.getBigIntegerValue().longValue();
+ assertTrue( "ResetAt metadata attribute is not set",
numSuccessfulRequestsMetric.isSetResetAt() );
+ assertFalse( "Duration metadata attribute is set",
numSuccessfulRequestsMetric.isSetDuration() );
assertTrue( numRequests >= numFailedRequests + numSuccessfulRequests );
XmlObject serviceTimePropElem = getSingleProperty( m_resource,
EndpointMetricsCapability.PROP_NAME_SERVICE_TIME );
assertTrue( serviceTimePropElem instanceof DurationMetric );
+ DurationMetric serviceTimeMetric =
((DurationMetric)serviceTimePropElem);
+ assertTrue( "Duration metadata attribute is not set",
serviceTimeMetric.isSetDuration() );
XmlObject maxResponseTimePropElem = getSingleProperty( m_resource,
EndpointMetricsCapability.PROP_NAME_MAX_RESPONSE_TIME );
assertTrue( maxResponseTimePropElem instanceof DurationMetric );
+ DurationMetric maxResponseTimeMetric =
((DurationMetric)maxResponseTimePropElem);
+ assertTrue( "Duration metadata attribute is not set",
maxResponseTimeMetric.isSetDuration() );
XmlObject lastResponseTimePropElem = getSingleProperty( m_resource,
EndpointMetricsCapability.PROP_NAME_LAST_RESPONSE_TIME );
assertTrue( lastResponseTimePropElem instanceof DurationMetric );
- // TODO: validate metric attributes
}
public void testMuwsStatus() throws FaultException
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]