1
1
using System ;
2
+ using System . IO . Pipelines ;
2
3
using System . Threading . Tasks ;
3
4
using FluentAssertions ;
4
5
using MediatR ;
@@ -15,7 +16,10 @@ namespace Lsp.Tests.Integration
15
16
{
16
17
public class ConnectionAndDisconnectionTests : LanguageProtocolTestBase
17
18
{
18
- public ConnectionAndDisconnectionTests ( ITestOutputHelper outputHelper ) : base ( new JsonRpcTestOptions ( ) . ConfigureForXUnit ( outputHelper ) . WithTestTimeout ( TimeSpan . FromSeconds ( 10 ) ) )
19
+ public ConnectionAndDisconnectionTests ( ITestOutputHelper outputHelper ) : base ( new JsonRpcTestOptions ( )
20
+ . ConfigureForXUnit ( outputHelper )
21
+ . WithTestTimeout ( TimeSpan . FromSeconds ( 20 ) )
22
+ )
19
23
{
20
24
}
21
25
@@ -28,7 +32,7 @@ public async Task Server_Should_Stay_Alive_When_Requests_Throw_An_Exception()
28
32
result . Should ( ) . BeTrue ( ) ;
29
33
30
34
Func < Task > a = ( ) => client . SendRequest ( "throw" ) . ReturningVoid ( CancellationToken ) ;
31
- a . Should ( ) . Throw < InternalErrorException > ( ) ;
35
+ await a . Should ( ) . ThrowAsync < InternalErrorException > ( ) ;
32
36
33
37
result = await client . SendRequest ( "keepalive" ) . Returning < bool > ( CancellationToken ) ;
34
38
result . Should ( ) . BeTrue ( ) ;
@@ -43,7 +47,7 @@ public async Task Client_Should_Stay_Alive_When_Requests_Throw_An_Exception()
43
47
result . Should ( ) . BeTrue ( ) ;
44
48
45
49
Func < Task > a = ( ) => server . SendRequest ( "throw" ) . ReturningVoid ( CancellationToken ) ;
46
- a . Should ( ) . Throw < InternalErrorException > ( ) ;
50
+ await a . Should ( ) . ThrowAsync < InternalErrorException > ( ) ;
47
51
48
52
result = await server . SendRequest ( "keepalive" ) . Returning < bool > ( CancellationToken ) ;
49
53
result . Should ( ) . BeTrue ( ) ;
0 commit comments