@@ -16,12 +16,6 @@ namespace Akka.TestKit
1616 /// </summary>
1717 public class TestKitSettings : IExtension
1818 {
19- private readonly TimeSpan _defaultTimeout ;
20- private readonly TimeSpan _singleExpectDefault ;
21- private readonly TimeSpan _testEventFilterLeeway ;
22- private readonly double _timefactor ;
23- private readonly bool _logTestKitCalls ;
24-
2519 /// <summary>
2620 /// Initializes a new instance of the <see cref="TestKitSettings"/> class.
2721 /// </summary>
@@ -34,28 +28,31 @@ public TestKitSettings(Config config)
3428 if ( config . IsNullOrEmpty ( ) )
3529 throw ConfigurationException . NullOrEmptyConfig < TestKitSettings > ( ) ;
3630
37- _defaultTimeout = config . GetTimeSpan ( "akka.test.default-timeout" , null , allowInfinite : false ) ;
38- _singleExpectDefault = config . GetTimeSpan ( "akka.test.single-expect-default" , null , allowInfinite : false ) ;
39- _testEventFilterLeeway = config . GetTimeSpan ( "akka.test.filter-leeway" , null , allowInfinite : false ) ;
40- _timefactor = config . GetDouble ( "akka.test.timefactor" , 0 ) ;
41- _logTestKitCalls = config . GetBoolean ( "akka.test.testkit.debug" , false ) ;
31+ DefaultTimeout = config . GetTimeSpan ( "akka.test.default-timeout" , null , allowInfinite : false ) ;
32+ SingleExpectDefault = config . GetTimeSpan ( "akka.test.single-expect-default" , null , allowInfinite : false ) ;
33+ TestKitStartupTimeout = config . GetTimeSpan ( "akka.test.startup-timeout" , null , allowInfinite : false ) ;
34+ TestEventFilterLeeway = config . GetTimeSpan ( "akka.test.filter-leeway" , null , allowInfinite : false ) ;
35+ TestTimeFactor = config . GetDouble ( "akka.test.timefactor" , 0 ) ;
36+ LogTestKitCalls = config . GetBoolean ( "akka.test.testkit.debug" , false ) ;
4237
43- if ( _timefactor <= 0 )
44- throw new ConfigurationException ( $@ "Expected a positive value for ""akka.test.timefactor"" but found { _timefactor } ") ;
38+ if ( TestTimeFactor <= 0 )
39+ throw new ConfigurationException ( $@ "Expected a positive value for ""akka.test.timefactor"" but found { TestTimeFactor } ") ;
4540 }
4641
4742
4843 /// <summary>
4944 /// Gets the default timeout as specified in the setting akka.test.default-timeout.
5045 /// Typically used for Ask-timeouts. It is always finite.
5146 /// </summary>
52- public TimeSpan DefaultTimeout { get { return _defaultTimeout ; } }
47+ public TimeSpan DefaultTimeout { get ; }
5348
5449 /// <summary>Gets the config value "akka.test.single-expect-default". It is always finite.</summary>
55- public TimeSpan SingleExpectDefault { get { return _singleExpectDefault ; } }
50+ public TimeSpan SingleExpectDefault { get ; }
5651
5752 /// <summary>Gets the config value "akka.test.filter-leeway". It is always finite.</summary>
58- public TimeSpan TestEventFilterLeeway { get { return _testEventFilterLeeway ; } }
53+ public TimeSpan TestEventFilterLeeway { get ; }
54+
55+ public TimeSpan TestKitStartupTimeout { get ; }
5956
6057 /// <summary>
6158 /// Gets the timefactor by which all values are scaled by.
@@ -70,12 +67,12 @@ public TestKitSettings(Config config)
7067 /// <see cref="TestKitBase.Dilated">Testkit.Dilated</see>
7168 /// </para>
7269 /// </summary>
73- public double TestTimeFactor { get { return _timefactor ; } }
70+ public double TestTimeFactor { get ; }
7471
7572 /// <summary>
7673 /// If set to <c>true</c> calls to testkit will be logged.
7774 /// This is enabled by setting the configuration value "akka.test.testkit.debug" to a true.
7875 /// </summary>
79- public bool LogTestKitCalls { get { return _logTestKitCalls ; } }
76+ public bool LogTestKitCalls { get ; }
8077 }
8178}
0 commit comments