File tree 4 files changed +20
-44
lines changed
4 files changed +20
-44
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ SPDX-License-Identifier: MPL-2.0
9
9
<CentralPackageTransitivePinningEnabled >false</CentralPackageTransitivePinningEnabled >
10
10
</PropertyGroup >
11
11
<ItemGroup >
12
- <PackageVersion Include =" C-DEngine" Version =" 5.171.1 " />
12
+ <PackageVersion Include =" C-DEngine" Version =" 5.171.2 " />
13
13
<PackageVersion Include =" coverlet.collector" Version =" 6.0.0" />
14
14
<PackageVersion Include =" LiteDB" Version =" 5.0.17" />
15
15
<PackageVersion Include =" Microsoft.Extensions.Configuration.Abstractions" Version =" 8.0.0" />
@@ -31,8 +31,8 @@ SPDX-License-Identifier: MPL-2.0
31
31
<PackageVersion Include =" System.Data.SQLite.Core" Version =" 1.0.118" />
32
32
<PackageVersion Include =" System.IO.Abstractions" Version =" 19.2.87" />
33
33
<PackageVersion Include =" System.Text.Json" Version =" 8.0.0" />
34
- <PackageVersion Include =" xunit" Version =" 2.6.1 " />
35
- <PackageVersion Include =" xunit.runner.visualstudio" Version =" 2.5.3 " />
34
+ <PackageVersion Include =" xunit" Version =" 2.6.2 " />
35
+ <PackageVersion Include =" xunit.runner.visualstudio" Version =" 2.5.4 " />
36
36
</ItemGroup >
37
37
<ItemGroup >
38
38
<GlobalPackageReference Include =" MinVer" Version =" 4.3.0" >
Original file line number Diff line number Diff line change 2
2
3
3
![ License] ( https://img.shields.io/github/license/trumpf-iot/saf )
4
4
![ Nuget] ( https://img.shields.io/nuget/v/SAF.Common )
5
- ![ .NET Core] ( https://github.com/TRUMPF-IoT /saf/workflows/.NET%20Core /badge.svg )
5
+ ![ .NET Core] ( https://github.com/trumpf-iot /saf/actions/ workflows/dotnet-core.yml /badge.svg?branch=master )
6
6
7
7
The Smart Application Framework (SAF) is an open-source and cross-plattform framework for building distributed applications across cloud and edge. It allows developers to build resilient, stateless and stateful plug-ins that run on cloud and edge.
8
8
Original file line number Diff line number Diff line change @@ -49,30 +49,6 @@ public async Task StartsAndStopsLoadedServices(bool asyncService)
49
49
Assert . Equal ( 0 , callCounters . KillCalled ) ;
50
50
}
51
51
52
- [ Theory ]
53
- [ InlineData ( false ) ]
54
- [ InlineData ( true ) ]
55
- public async Task StopsLoadedServicesOnDispose ( bool asyncService )
56
- {
57
- // Arrange
58
- var callCounters = new CallCounters ( ) ;
59
- using ( var sut = SetupServiceHostWithCallCountersService ( callCounters , asyncService ) )
60
- {
61
- // Act
62
- await sut . StartAsync ( CancellationToken . None ) ;
63
-
64
- // Assert
65
- Assert . Equal ( 1 , callCounters . StartCalled ) ;
66
- Assert . Equal ( 0 , callCounters . StopCalled ) ;
67
- Assert . Equal ( 0 , callCounters . KillCalled ) ;
68
- }
69
-
70
- // Assert
71
- Assert . Equal ( 1 , callCounters . StartCalled ) ;
72
- Assert . Equal ( 1 , callCounters . StopCalled ) ;
73
- Assert . Equal ( 0 , callCounters . KillCalled ) ;
74
- }
75
-
76
52
[ Theory ]
77
53
[ InlineData ( false ) ]
78
54
[ InlineData ( true ) ]
Original file line number Diff line number Diff line change @@ -66,21 +66,6 @@ public Task StartAsync(CancellationToken cancellationToken)
66
66
}
67
67
} , cancellationToken ) ;
68
68
69
- private async Task StartInternalAsync ( CancellationToken token )
70
- {
71
- var stopWatch = new Stopwatch ( ) ;
72
- stopWatch . Start ( ) ;
73
-
74
- InitializeServices ( ) ;
75
- AddRuntimeMessageHandlersToDispatcher ( ) ;
76
-
77
- await StartServicesAsync ( _services , token ) ;
78
-
79
- stopWatch . Stop ( ) ;
80
-
81
- _log . LogInformation ( $ "Starting all services took { stopWatch . Elapsed . TotalMilliseconds * 1000000 : N0} ns") ;
82
- }
83
-
84
69
public async Task StopAsync ( CancellationToken cancellationToken )
85
70
{
86
71
if ( _services . Count == 0 )
@@ -115,7 +100,22 @@ public async Task StopAsync(CancellationToken cancellationToken)
115
100
116
101
public void Dispose ( )
117
102
{
118
- StopAsync ( CancellationToken . None ) . Wait ( ) ;
103
+ // intentionally left blank
104
+ }
105
+
106
+ private async Task StartInternalAsync ( CancellationToken token )
107
+ {
108
+ var stopWatch = new Stopwatch ( ) ;
109
+ stopWatch . Start ( ) ;
110
+
111
+ InitializeServices ( ) ;
112
+ AddRuntimeMessageHandlersToDispatcher ( ) ;
113
+
114
+ await StartServicesAsync ( _services , token ) ;
115
+
116
+ stopWatch . Stop ( ) ;
117
+
118
+ _log . LogInformation ( $ "Starting all services took { stopWatch . Elapsed . TotalMilliseconds * 1000000 : N0} ns") ;
119
119
}
120
120
121
121
private async Task StartServicesAsync ( IEnumerable < IHostedServiceBase > services , CancellationToken cancelToken )
You can’t perform that action at this time.
0 commit comments