Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eulerfx committed Feb 22, 2017
1 parent e56e210 commit 9701c4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/kafunk/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("kafunk")>]
[<assembly: AssemblyProductAttribute("kafunk")>]
[<assembly: AssemblyDescriptionAttribute("F# client for Kafka")>]
[<assembly: AssemblyVersionAttribute("0.0.27")>]
[<assembly: AssemblyFileVersionAttribute("0.0.27")>]
[<assembly: AssemblyVersionAttribute("0.0.28")>]
[<assembly: AssemblyFileVersionAttribute("0.0.28")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "0.0.27"
let [<Literal>] InformationalVersion = "0.0.27"
let [<Literal>] Version = "0.0.28"
let [<Literal>] InformationalVersion = "0.0.28"
8 changes: 4 additions & 4 deletions tests/kafunk.Tests/FaultsTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ let ``Faults.AsyncFunc.retryResultList should retry with reevaluation`` () =

for attempts in [1..5] do

let mutable i = 0
let mutable i = 1

let sleepEcho () =
if Interlocked.Increment &i > attempts then
Expand Down Expand Up @@ -103,10 +103,10 @@ let ``Faults.AsyncFunc.retryResultList should retry timeout with backoff and suc

let policy = RetryPolicy.constantMs 10 |> RetryPolicy.maxAttempts attempts

let attempts = if fail then attempts + 2 else attempts
let attempts = if fail then attempts + 1 else attempts

let sleepEcho =
let mutable i = 0
let mutable i = 1
fun () -> async {
if Interlocked.Increment &i > attempts then
return ()
Expand All @@ -121,7 +121,7 @@ let ``Faults.AsyncFunc.retryResultList should retry timeout with backoff and suc
|> Faults.AsyncFunc.retryResultList policy

let expected =
if fail then Failure (List.init attempts ignore)
if fail then Failure (List.init (attempts - 1) ignore)
else Success ()

let actual = sleepEcho () |> Async.RunSynchronously
Expand Down

0 comments on commit 9701c4e

Please sign in to comment.