diff --git a/Directory.Packages.props b/Directory.Packages.props
index 86864e2b8..850902ccc 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -3,7 +3,7 @@
true
-
+
@@ -29,18 +29,18 @@
-
-
+
+
-
+
-
+
@@ -54,7 +54,7 @@
-
+
@@ -63,18 +63,18 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -117,7 +117,7 @@
-
+
diff --git a/build/scripts/Tooling.fs b/build/scripts/Tooling.fs
index 445111974..d91bee954 100644
--- a/build/scripts/Tooling.fs
+++ b/build/scripts/Tooling.fs
@@ -20,33 +20,30 @@ module Tooling =
let private defaultConsoleWriter = Some(ConsoleOutColorWriter() :> IConsoleOutWriter)
- let private readInWithTimeout timeout workingDir bin (writer: IConsoleOutWriter option) args =
+ let private readInWithTimeout (timeout :TimeSpan) workingDir bin (writer: IConsoleOutWriter option) args =
let startArgs = StartArguments(bin, args |> List.toArray)
+ startArgs.Timeout <- timeout
+ startArgs.ConsoleOutWriter <- Option.defaultValue (NoopWriter()) writer
if (Option.isSome workingDir) then
startArgs.WorkingDirectory <- Option.defaultValue "" workingDir
- let result = Proc.Start(startArgs, timeout, Option.defaultValue (NoopWriter()) writer)
+ let result = Proc.Start(startArgs)
if not result.Completed then failwithf "process failed to complete within %O: %s" timeout bin
if not result.ExitCode.HasValue then failwithf "process yielded no exit code: %s" bin
{ ExitCode = result.ExitCode.Value; Output = seq result.ConsoleOut}
-
- let private read bin args = readInWithTimeout defaultTimeout None bin defaultConsoleWriter args
- let private readQuiet bin args = readInWithTimeout defaultTimeout None bin None args
-
- let private execInWithTimeout timeout workingDir bin args =
+
+ let private execInWithTimeout (timeout :TimeSpan) workingDir bin args =
let startArgs = ExecArguments(bin, args |> List.toArray)
+ startArgs.Timeout <- timeout
if (Option.isSome workingDir) then
startArgs.WorkingDirectory <- Option.defaultValue "" workingDir
- let result = Proc.Exec(startArgs, timeout)
+ let result = Proc.Exec(startArgs)
try
- if not result.HasValue || result.Value > 0 then
- failwithf "process returned %i: %s" result.Value bin
+ if result > 0 then
+ failwithf "process returned %i: %s" result bin
with
| :? ProcExecException as ex -> failwithf "%s" ex.Message
- let private execIn workingDir bin args = execInWithTimeout defaultTimeout workingDir bin args
- let private exec bin args = execIn None bin args
-
type BuildTooling(timeout, path) =
let timeout = match timeout with | Some t -> t | None -> defaultTimeout
member this.Path = path
diff --git a/dotnet-tools.json b/dotnet-tools.json
index e5fd17baf..fd336aeb5 100644
--- a/dotnet-tools.json
+++ b/dotnet-tools.json
@@ -9,7 +9,7 @@
]
},
"minver-cli": {
- "version": "4.3.0",
+ "version": "6.0.0",
"commands": [
"minver"
]
diff --git a/src/Elastic.Apm/Elastic.Apm.csproj b/src/Elastic.Apm/Elastic.Apm.csproj
index 361acc507..c23a8041e 100644
--- a/src/Elastic.Apm/Elastic.Apm.csproj
+++ b/src/Elastic.Apm/Elastic.Apm.csproj
@@ -46,6 +46,7 @@
+
diff --git a/test/Elastic.Apm.Tests.Utilities/ShouldWaitDurationExtensions.cs b/test/Elastic.Apm.Tests.Utilities/ShouldWaitDurationExtensions.cs
index d35953114..e91c8c2af 100644
--- a/test/Elastic.Apm.Tests.Utilities/ShouldWaitDurationExtensions.cs
+++ b/test/Elastic.Apm.Tests.Utilities/ShouldWaitDurationExtensions.cs
@@ -9,13 +9,13 @@ namespace Elastic.Apm.Tests.Utilities
{
public static class ShouldWaitDurationExtensions
{
- public static AndConstraint>
+ public static AndConstraint>
BeGreaterOrEqualToMinimumSleepLength(this NullableNumericAssertions duration) =>
- duration.NotBeNull().And.BeGreaterOrEqualTo(WaitHelpers.SleepLength);
+ duration.NotBeNull().And.BeGreaterOrEqualTo(WaitHelpers.SleepLength);
- public static AndConstraint> BeGreaterOrEqualToMinimumSleepLength(this NullableNumericAssertions duration,
- int numberOfSleeps
- )
+ public static AndConstraint> BeGreaterOrEqualToMinimumSleepLength(
+ this NullableNumericAssertions duration,
+ int numberOfSleeps)
{
var expectedTransactionLength = numberOfSleeps * WaitHelpers.SleepLength;
return duration.NotBeNull()
diff --git a/test/Elastic.Apm.Tests.Utilities/XUnit/DockerAttributes.cs b/test/Elastic.Apm.Tests.Utilities/XUnit/DockerAttributes.cs
index 8332ea684..dfa96d9eb 100644
--- a/test/Elastic.Apm.Tests.Utilities/XUnit/DockerAttributes.cs
+++ b/test/Elastic.Apm.Tests.Utilities/XUnit/DockerAttributes.cs
@@ -67,7 +67,7 @@ static DockerUtils()
{
try
{
- var result = Proc.Start(new StartArguments("docker", "--version"), TimeSpan.FromSeconds(30));
+ var result = Proc.Start(new StartArguments("docker", "--version") { Timeout = TimeSpan.FromSeconds(30)});
HasDockerInstalled = result.ExitCode == 0;
}
catch (Exception)
diff --git a/test/Elastic.Apm.Tests/BackendCommTests/CentralConfig/CentralConfigResponseParserTests.cs b/test/Elastic.Apm.Tests/BackendCommTests/CentralConfig/CentralConfigResponseParserTests.cs
index a0b8ed89a..ea66a245d 100644
--- a/test/Elastic.Apm.Tests/BackendCommTests/CentralConfig/CentralConfigResponseParserTests.cs
+++ b/test/Elastic.Apm.Tests/BackendCommTests/CentralConfig/CentralConfigResponseParserTests.cs
@@ -305,7 +305,7 @@ public static IEnumerable