Skip to content

Commit aeb50a6

Browse files
#106 Add support of "initialHealthCheck" driver configuration property
1 parent 1a7b28c commit aeb50a6

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

src/Atata.Configuration.Json/DriverJsonSection.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ public class DriverJsonSection : JsonSection
88

99
public int? CreateRetries { get; set; }
1010

11+
public bool? InitialHealthCheck { get; set; }
12+
1113
public string RemoteAddress { get; set; }
1214

1315
public DriverOptionsJsonSection Options { get; set; }

src/Atata.Configuration.Json/Mapping/DriverJsonMapper`3.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ protected virtual void Map(DriverJsonSection section, TBuilder builder)
4040
if (section.CreateRetries != null)
4141
builder.WithCreateRetries(section.CreateRetries.Value);
4242

43+
if (section.InitialHealthCheck != null)
44+
builder.WithInitialHealthCheck(section.InitialHealthCheck.Value);
45+
4346
if (section.CommandTimeout != null)
4447
builder.WithCommandTimeout(TimeSpan.FromSeconds(section.CommandTimeout.Value));
4548

test/Atata.Configuration.Json.Tests/CommonDriverPropertiesTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ public void SetUpSuite()
1616
[Test]
1717
public void CreateRetries() =>
1818
_sut.ValueOf(x => x.CreateRetries).Should.Be(7);
19+
20+
[Test]
21+
public void InitialHealthCheck() =>
22+
_sut.ValueOf(x => x.InitialHealthCheck).Should.BeTrue();
1923
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"driver": {
33
"type": "chrome",
4-
"createRetries": 7
4+
"createRetries": 7,
5+
"initialHealthCheck": true
56
}
67
}

0 commit comments

Comments
 (0)