Commit Graph
33 Commits
Author SHA1 Message Date
Alexander Köplinger f396d37c54 [System.ServiceModel] Changed test port from 8080 to 30158
Port 8080 is widely used and resulted in address conflicts on monojenkins, so we use a different port instead.

Commit licensed under MIT/X11.
2014-06-17 23:00:42 +02:00
Martin Baulig 37b26ae4a0 [#7177][WCF]: Correctly handle derived FaultExceptions. 2012-09-19 06:01:11 +02:00
Marek Safar 69729c7e40 Disable more failing tests 2012-06-18 16:30:29 +01:00
Jonathan Pryor 00e29089c7 [System.ServiceModel] Don't try to deserialize void messages.
Fixes: http://bugzilla.xamarin.com/show_bug.cgi?id=1164

The breakage reported in #1164 was caused by commit 106fdeb4, which
fixed bxc206. The problem is that in fixing bxc206, response messages
of a type having a MessageContractAttribute custom attribute were
changed to have a `void` return type, according to the
MessageDescription's Body.ReturnValue.Type property.

This fix is correct, in that it's what .NET does, but it broke XML
deserialization which expected the "actual" return type to exist, not
`void`.

Case in point: the added IService1.EndJSMGetDatabases() method will
have a MessageDescription with a Body.ReturnValue.Type=typeof(void).
The problem is that deserializing this message will fail:

	System.Runtime.Serialization.SerializationException: Deserializing
	type 'System.Void'. Expecting state 'EndElement'. Encountered state
	'Text' with name '' with namespace ''.

Obviously this is not good. ;-)

The fix is simple: don't use the MessageDescription's ReturnValue if
it's `typeof(void)`.

There are two added wrinkles:

 1. Writing a test case for the above.

 2. The test case broke with another error: a NRE within
    BaseMessagesFormatter.MessageObjectToParts(). This is because
    when ContractDescriptionGenerator.GetMessage() sets the
    ReturnValue for a response message, it doesn't set
    MessagePartDescription.MemberInfo.
    BaseMessagesFormatter.MessageObjectToParts(), meanwhile, was
    checking the ReturnValue's MemberInfo...which was null.

    Add a null check here so that the actual bug can be tested.
2012-01-20 00:18:54 -05:00
Jonathan Pryor 5a6f9b7e52 [System.ServiceModel] Speed up Bug652331_2Test test execution.
For reasons I currently can't explain, the Service1Client test type
appears to support having only one async operation "in flight" at a
time. As a result of this, calling multiple Async methods on the
Service1Client instance, as was done previously, would result in not
all of the event handlers being invoked, and the test timing out
after 60s instead of exiting quickly because all event handlers had
been raised.

I don't understand enough of WCF & this code to say why Service1Client
can have only one async operation in progress at once, but making this
change so that each async operation operates on a separate instance
speeds up the Bug652331_2Test execution from 60s to 5s.
2012-01-20 00:18:53 -05:00
Miguel de Icaza 2852ed0b59 Update copyrights 2011-09-13 18:26:13 -04:00
Atsushi Eno 2be522da83 This filter should ignore port, and should not filter out anonymous URIs. 2011-08-24 12:00:59 -07:00
Atsushi Eno 5261535c35 Fix 2.0 test build (disable it). 2011-02-25 12:35:47 +09:00
Atsushi Eno 1d62f3e9e5 xsi:type parsing is wrong in default namespace resolution.
Fixed case #3 in bug #652331.
2011-02-16 18:02:28 +09:00
Atsushi Eno 58a7b75bd8 Support ServiceKnownTypes. Fixed another case on bug #652331. 2011-02-09 15:42:40 +09:00
Atsushi Eno 0c7a1a1f5c Fix the issue that callback contract often gets confused by picking unexpected contract type.
The problem is that DispatchRuntime.Type is a service implementation type
that could implement two or more contract interfaces, and it was in random
order how ServiceProxyGenerator picks up the contract type. Now it looks
for correct contract type instead of the service type by exactly looking
for the target contract in the endpoint (dispatcher).
2010-09-29 16:41:59 +09:00
Atsushi Eno 6764dbe11c 2010-06-22 Atsushi Enomoto <[email protected]>
* ServiceBehaviorAttribute.cs : do not overwrite existing properties
	  which may have been set by preceding behaviors. Fix WSDL output.
	* EnvelopeVersion.cs : fix name and namespace for None property.

	* HttpListenerManager.cs : add some comments.

	* DispatchRuntimeTest.cs : add another line of assertion.


svn path=/trunk/mcs/; revision=159313
2010-06-22 08:46:23 +00:00
Atsushi Eno 880083beeb 2010-06-18 Atsushi Enomoto <[email protected]>
* ServiceHostBase.cs : Do not build more than one ChannelDispatcher
	  for a Binding. Then check duplicate listen URIs, excluding mex ones.

	* ChannelDispatcher.cs : add simple bool field to mark for mex channel.

	* ServiceMetadataExtension.cs : use simple ChannelDispatcher.IsMex field.

	* ServiceHostTest.cs : improved endpoint tests and enabled them.

	* ChannelDispatcherTest.cs : had to disable a test that regressed from
	  validating duplicate listen URI. Possible remedy is described too.


svn path=/trunk/mcs/; revision=159140
2010-06-18 15:33:40 +00:00
Atsushi Eno da6fdf34e6 2010-04-05 Atsushi Enomoto <[email protected]>
* EndpointAddressMessageFilter.cs : check null arg. Return false for
	  no To header case and do not result in NRE.f

	* EndpointAddressMessageFilterTest.cs :
	  Add null arg case. Enable working test.


svn path=/trunk/mcs/; revision=154787
2010-04-05 09:11:12 +00:00
Atsushi Eno e5a0f6bd4a 2010-04-05 Atsushi Enomoto <[email protected]>
* DispatchRuntimeTest.cs : enabled working tests again.


svn path=/trunk/mcs/; revision=154782
2010-04-05 07:48:01 +00:00
Atsushi Eno d51ce00eba 2010-04-02 Atsushi Enomoto <[email protected]>
* ContractDescriptionGenerator.cs : fill FaultDescription action,
	  name and namespace as expected.

	* FaultDescriptionTest.cs : add new test.

	* FaultContractAttributeTest.cs : new test.

	* System.ServiceModel_test.dll.sources : add some new fault tests.


svn path=/trunk/mcs/; revision=154698
2010-04-02 09:39:45 +00:00
Atsushi Eno 31cad75870 2010-04-02 Atsushi Enomoto <[email protected]>
* DispatchOperationTest.cs : added not-working FaultContractInfo test.


svn path=/trunk/mcs/; revision=154697
2010-04-02 09:09:26 +00:00
Atsushi Eno 9248aceeaf 2010-03-18 Atsushi Enomoto <[email protected]>
* XPathMessageContext.cs : implement.
	* XPathMessageFilterTable.cs : add some missing overloads.

	* Constants.cs : add more.

	* System.ServiceModel_test.dll.sources :
	  Add Constants.cs and XPathMessageContextTest.cs.

	* XPathMessageContextTest.cs : new.

	* Constants.cs : copied from the lib itself.


svn path=/trunk/mcs/; revision=153833
2010-03-18 13:02:16 +00:00
Atsushi Eno 100a22b6e2 2010-01-06 Atsushi Enomoto <[email protected]>
* ChannelDispatcherTest.cs : format message correctly.


svn path=/trunk/mcs/; revision=149098
2010-01-06 03:20:02 +00:00
Atsushi Eno 5ef8f567cd 2009-12-02 Atsushi Enomoto <[email protected]>
* NetTcpBindingTest.cs :
	  I have to disable a lot of connective tests that somehow blocks
	  test runs. No idea why it started to happen though.

	* DispatchRuntimeTest.cs :
	  I have to disable a lot of connective tests that somehow blocks
	  test runs. No idea why it started to happen though.

	* CustomPeerResolverServiceTest.cs :
	  I have to disable a lot of connective tests that somehow blocks
	  test runs. No idea why it started to happen though.
	  (It internally uses HTTP binding, which is the indirect source of
	  the problem here.)


svn path=/trunk/mcs/; revision=147398
2009-12-02 08:32:25 +00:00
Atsushi Eno e3f4a64baf 2009-09-17 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs, EndpointDispatcher.cs :
	  when an EndpointDispatcher is added to ChannelDispatcher, its
	  ChannelDispatcher property is automatically filled. To do this,
	  create a derived collection type for Endpoints (that's what .NET
	  does). Remove extra InitializeEndpoint() argument.

	* DuplexClientRuntimeChannel.cs : reflecting EndpointDispatcher change.

	* ChannelDispatcherTest.cs : add a test to make sure that
	  EndpointDispatcher.ChannelDispatcher property is filled by Add().


svn path=/trunk/mcs/; revision=142124
2009-09-17 17:58:15 +00:00
Atsushi Eno 7200b3ed0d 2009-09-11 Atsushi Enomoto <[email protected]>
* ChannelDispatcherTest.cs : refine AcceptChannel invocation check
	  and make it not to fail on .NET.


svn path=/trunk/mcs/; revision=141776
2009-09-11 15:53:18 +00:00
Atsushi Eno e1fd25bc16 2009-07-02 Atsushi Enomoto <[email protected]>
* ServiceBehaviorAttribute.cs : fill SingletonInstanceContext on
	  opening the host.

	* ChannelDispatcherTest.cs : add singleton instance context test
	  (but disabled, for some weird conflict).


svn path=/trunk/mcs/; revision=137315
2009-07-02 18:32:20 +00:00
Atsushi Eno 50bad4b114 2009-06-25 Atsushi Enomoto <[email protected]>
* ChannelDispatcherTest.cs : add some instance provider tests.


svn path=/trunk/mcs/; revision=136861
2009-06-25 17:57:37 +00:00
Atsushi Eno f27bca4e70 2009-06-23 Atsushi Enomoto <[email protected]>
* ServiceHostBase.cs : remove more TODO.

	* DispatchRuntime.cs : do not fill InstanceContextProvider here.
	* ChannelDispatcher.cs : do it here instead.
	* ChannelDispatcherCollection.cs : remove TODOs.

	* ChannelDispatcherTest.cs : make sure that the port to be in use is
	  available before running the tests. Check attach state.
	* DispatchRuntimeTest.cs : make sure that it runs through all the
	  behavior tests.


svn path=/trunk/mcs/; revision=136695
2009-06-23 10:21:19 +00:00
Atsushi Eno 91c8ac7b5c 2009-06-16 Atsushi Enomoto <[email protected]>
* DispatchRuntimeTest.cs : add reasonable timeout and close client
	  appropriately. Objects are disposed in different ways than .NET.
	  Do not expect things automatically disposed as just time goes by.


svn path=/trunk/mcs/; revision=136221
2009-06-16 13:34:26 +00:00
Atsushi Eno f9e5916bca 2009-06-12 Atsushi Enomoto <[email protected]>
* ChannelDispatcherTest.cs : make sure to close service host,
	  within rational TimeSpan.


svn path=/trunk/mcs/; revision=135980
2009-06-12 10:09:59 +00:00
Atsushi Eno ad9d1f05cc 2009-06-09 Atsushi Enomoto <[email protected]>
* ChannelDispatcherTest.cs : add ServiceThrottle test, and comments.


svn path=/trunk/mcs/; revision=135729
2009-06-09 07:50:32 +00:00
Atsushi Eno 7bcaf9bbbc 2009-05-13 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs, SecurityHandler.cs,
	  InputOrReplyRequestProcessor.cs, MessageProcessingContext.cs :
	  remove default communication timeouts from several types. They
	  bring bogus NRE. Instead, fill timeouts in ChannelDispatcher and
	  use it when required (it was actually *only* request processor).

	* ChannelDispatcherTest.cs : make sure ctor args are nullable.


svn path=/trunk/mcs/; revision=134044
2009-05-13 10:08:46 +00:00
Atsushi Eno 4a23fddcb7 2009-04-27 Atsushi Enomoto <[email protected]>
* DispatchRuntime.cs : some comment.
	* ChannelDispatcher.cs : ongoing changes to handle listeners and
	  accepted channels at more precise state. Listeners are opened,
	  without accepting channels. Some setup code is done at OnOpen(),
	  while some are done at OnOpened().

	* ServiceHost.cs : split dispatcher open from dispatcher loop start.
	  Use DispatchRuntime.Type to specify service type.

	* ChannelDispatcherTest.cs : added a couple of EndpointDispatcher
	  state tests.


svn path=/trunk/mcs/; revision=132739
2009-04-27 14:40:43 +00:00
Atsushi Eno a93062e7b6 Ignore all failing-under-dotnet tests.
svn path=/trunk/mcs/; revision=127845
2009-02-24 07:33:41 +00:00
Atsushi Eno b7fce89f1b 2009-01-21 Atsushi Enomoto <[email protected]>
* PrimitiveTesterTest.cs : disable failing test.

	* DispatchRuntimeTest.cs : disable failing test.


svn path=/trunk/mcs/; revision=124021
2009-01-21 10:29:34 +00:00
Jb Evain bdd0809c70 move to from olive to mcs
svn path=/trunk/mcs/; revision=111187
2008-08-20 21:24:37 +00:00