@@ -168,8 +168,12 @@ public static void WebSocket_Http_Duplex_Buffered(NetHttpMessageEncoding message
168
168
"The logging done by the Server was not returned via the Callback." ) ;
169
169
170
170
// *** CLEANUP *** \\
171
- ( ( ICommunicationObject ) client ) . Close ( ) ;
172
- channelFactory . Close ( ) ;
171
+ // Close the client and channel factory if not running on localhost. CoreWCF has a bug in Close method (on Linux).
172
+ if ( ! ScenarioTestHelpers . IsLocalHost ( ) )
173
+ {
174
+ ( ( ICommunicationObject ) client ) . Close ( ) ;
175
+ channelFactory . Close ( ) ;
176
+ }
173
177
}
174
178
finally
175
179
{
@@ -236,8 +240,12 @@ public static void WebSocket_Http_Duplex_Buffered_KeepAlive(NetHttpMessageEncodi
236
240
"The logging done by the Server was not returned via the Callback." ) ;
237
241
238
242
// *** CLEANUP *** \\
239
- ( ( ICommunicationObject ) client ) . Close ( ) ;
240
- channelFactory . Close ( ) ;
243
+ // Close the client and channel factory if not running on localhost. CoreWCF has a bug in Close method (on Linux).
244
+ if ( ! ScenarioTestHelpers . IsLocalHost ( ) )
245
+ {
246
+ ( ( ICommunicationObject ) client ) . Close ( ) ;
247
+ channelFactory . Close ( ) ;
248
+ }
241
249
}
242
250
finally
243
251
{
@@ -416,7 +424,6 @@ public static void WebSocket_Https_Duplex_Buffered(NetHttpMessageEncoding messag
416
424
}
417
425
418
426
[ WcfTheory ]
419
- [ Condition ( nameof ( Skip_CoreWCFService_FailedTest ) ) ]
420
427
[ InlineData ( NetHttpMessageEncoding . Binary ) ]
421
428
[ InlineData ( NetHttpMessageEncoding . Text ) ]
422
429
[ InlineData ( NetHttpMessageEncoding . Mtom ) ]
@@ -472,8 +479,12 @@ public static void WebSocket_Http_RequestReply_Streamed(NetHttpMessageEncoding m
472
479
}
473
480
474
481
// *** CLEANUP *** \\
475
- ( ( ICommunicationObject ) client ) . Close ( ) ;
476
- channelFactory . Close ( ) ;
482
+ // Close the client and channel factory if not running on localhost. CoreWCF has a bug in Close method (on Linux).
483
+ if ( ! ScenarioTestHelpers . IsLocalHost ( ) )
484
+ {
485
+ ( ( ICommunicationObject ) client ) . Close ( ) ;
486
+ channelFactory . Close ( ) ;
487
+ }
477
488
}
478
489
finally
479
490
{
@@ -487,7 +498,6 @@ public static void WebSocket_Http_RequestReply_Streamed(NetHttpMessageEncoding m
487
498
[ InlineData ( NetHttpMessageEncoding . Text ) ]
488
499
[ InlineData ( NetHttpMessageEncoding . Mtom ) ]
489
500
[ Issue ( 1438 , OS = OSID . Windows_7 ) ] // not supported on Win7
490
- [ Condition ( nameof ( Skip_CoreWCFService_FailedTest ) ) ]
491
501
[ OuterLoop ]
492
502
public static void WebSocket_Http_RequestReply_Buffered ( NetHttpMessageEncoding messageEncoding )
493
503
{
@@ -527,8 +537,12 @@ public static void WebSocket_Http_RequestReply_Buffered(NetHttpMessageEncoding m
527
537
}
528
538
529
539
// *** CLEANUP *** \\
530
- ( ( ICommunicationObject ) client ) . Close ( ) ;
531
- channelFactory . Close ( ) ;
540
+ // Close the client and channel factory if not running on localhost. CoreWCF has a bug in Close method (on Linux).
541
+ if ( ! ScenarioTestHelpers . IsLocalHost ( ) )
542
+ {
543
+ ( ( ICommunicationObject ) client ) . Close ( ) ;
544
+ channelFactory . Close ( ) ;
545
+ }
532
546
}
533
547
finally
534
548
{
@@ -541,7 +555,6 @@ public static void WebSocket_Http_RequestReply_Buffered(NetHttpMessageEncoding m
541
555
[ InlineData ( NetHttpMessageEncoding . Binary ) ]
542
556
[ InlineData ( NetHttpMessageEncoding . Text ) ]
543
557
[ InlineData ( NetHttpMessageEncoding . Mtom ) ]
544
- [ Condition ( nameof ( Skip_CoreWCFService_FailedTest ) ) ]
545
558
[ Issue ( 1438 , OS = OSID . Windows_7 ) ] // not supported on Win7
546
559
[ OuterLoop ]
547
560
public static void WebSocket_Http_RequestReply_Buffered_KeepAlive ( NetHttpMessageEncoding messageEncoding )
@@ -582,8 +595,12 @@ public static void WebSocket_Http_RequestReply_Buffered_KeepAlive(NetHttpMessage
582
595
}
583
596
584
597
// *** CLEANUP *** \\
585
- ( ( ICommunicationObject ) client ) . Close ( ) ;
586
- channelFactory . Close ( ) ;
598
+ // Close the client and channel factory if not running on localhost. CoreWCF has a bug in Close method (on Linux).
599
+ if ( ! ScenarioTestHelpers . IsLocalHost ( ) )
600
+ {
601
+ ( ( ICommunicationObject ) client ) . Close ( ) ;
602
+ channelFactory . Close ( ) ;
603
+ }
587
604
}
588
605
finally
589
606
{
@@ -596,8 +613,7 @@ public static void WebSocket_Http_RequestReply_Buffered_KeepAlive(NetHttpMessage
596
613
[ InlineData ( NetHttpMessageEncoding . Binary ) ]
597
614
[ InlineData ( NetHttpMessageEncoding . Text ) ]
598
615
[ InlineData ( NetHttpMessageEncoding . Mtom ) ]
599
- [ Condition ( nameof ( Root_Certificate_Installed ) ,
600
- nameof ( Skip_CoreWCFService_FailedTest ) ) ]
616
+ [ Condition ( nameof ( Root_Certificate_Installed ) ) ]
601
617
[ Issue ( 3572 , OS = OSID . OSX ) ]
602
618
[ Issue ( 1438 , OS = OSID . Windows_7 ) ] // not supported on Win7
603
619
[ OuterLoop ]
@@ -638,8 +654,12 @@ public static void WebSocket_Https_RequestReply_Buffered(NetHttpMessageEncoding
638
654
}
639
655
640
656
// *** CLEANUP *** \\
641
- ( ( ICommunicationObject ) client ) . Close ( ) ;
642
- channelFactory . Close ( ) ;
657
+ // Close the client and channel factory if not running on localhost. CoreWCF has a bug in Close method (on Linux).
658
+ if ( ! ScenarioTestHelpers . IsLocalHost ( ) )
659
+ {
660
+ ( ( ICommunicationObject ) client ) . Close ( ) ;
661
+ channelFactory . Close ( ) ;
662
+ }
643
663
}
644
664
finally
645
665
{
@@ -652,8 +672,7 @@ public static void WebSocket_Https_RequestReply_Buffered(NetHttpMessageEncoding
652
672
[ InlineData ( NetHttpMessageEncoding . Binary ) ]
653
673
[ InlineData ( NetHttpMessageEncoding . Text ) ]
654
674
[ InlineData ( NetHttpMessageEncoding . Mtom ) ]
655
- [ Condition ( nameof ( Root_Certificate_Installed ) ,
656
- nameof ( Skip_CoreWCFService_FailedTest ) ) ]
675
+ [ Condition ( nameof ( Root_Certificate_Installed ) ) ]
657
676
[ Issue ( 3572 , OS = OSID . OSX ) ]
658
677
[ Issue ( 1438 , OS = OSID . Windows_7 ) ] // not supported on Win7
659
678
[ OuterLoop ]
@@ -696,8 +715,12 @@ public static void WebSocket_Https_RequestReply_Buffered_KeepAlive(NetHttpMessag
696
715
}
697
716
698
717
// *** CLEANUP *** \\
699
- ( ( ICommunicationObject ) client ) . Close ( ) ;
700
- channelFactory . Close ( ) ;
718
+ // Close the client and channel factory if not running on localhost. CoreWCF has a bug in Close method (on Linux).
719
+ if ( ! ScenarioTestHelpers . IsLocalHost ( ) )
720
+ {
721
+ ( ( ICommunicationObject ) client ) . Close ( ) ;
722
+ channelFactory . Close ( ) ;
723
+ }
701
724
}
702
725
finally
703
726
{
@@ -862,8 +885,12 @@ public static void WebSocket_Http_VerifyWebSocketsUsed()
862
885
Assert . True ( responseFromService , String . Format ( "Response from the service was not expected. Expected: 'True' but got {0}" , responseFromService ) ) ;
863
886
864
887
// *** CLEANUP *** \\
865
- ( ( ICommunicationObject ) client ) . Close ( ) ;
866
- channelFactory . Close ( ) ;
888
+ // Close the client and channel factory if not running on localhost. CoreWCF has a bug in Close method (on Linux).
889
+ if ( ! ScenarioTestHelpers . IsLocalHost ( ) )
890
+ {
891
+ ( ( ICommunicationObject ) client ) . Close ( ) ;
892
+ channelFactory . Close ( ) ;
893
+ }
867
894
}
868
895
finally
869
896
{
0 commit comments