Skip to content

Commit 988a0b4

Browse files
ylibrachbartelink
authored andcommitted
Fix test RU limits
1 parent 7497f96 commit 988a0b4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Equinox.Cosmos/Cosmos.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ module private MicrosoftAzureCosmosWrappers =
359359
type Azure.Core.ResponseHeaders with
360360
member headers.GetRequestCharge () =
361361
match headers.TryGetValue("x-ms-request-charge") with
362-
| true, charge -> float charge
362+
| true, charge when not <| String.IsNullOrEmpty charge -> float charge
363363
| _ -> 0.
364364

365365
type Azure.Cosmos.CosmosContainer with

tests/Equinox.Cosmos.Integration/CosmosCoreIntegration.fs

+5-5
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ type Tests(testOutputHelper) =
238238

239239
// 2 items atm
240240
test <@ [EqxAct.ResponseForward; EqxAct.ResponseForward; EqxAct.QueryForward] = capture.ExternalCalls @>
241-
verifyRequestChargesMax 6 } // 5.77
241+
verifyRequestChargesMax 9 } // 8.51 // WAS 6 // 5.77
242242

243243
[<AutoData(SkipIfRequestedViaEnvironmentVariable="EQUINOX_INTEGRATION_SKIP_COSMOS")>]
244244
let ``get Lazy`` (TestStream streamName) = Async.RunSynchronously <| async {
@@ -258,7 +258,7 @@ type Tests(testOutputHelper) =
258258
| _ -> None
259259
// validate that, despite only requesting max 1 item, we only needed one trip (which contained only one item)
260260
[1,1] =! capture.ChooseCalls queryRoundTripsAndItemCounts
261-
verifyRequestChargesMax 4 // 3.02 // WAS 3 // 2.97
261+
verifyRequestChargesMax 6 // 5.74 // WAS 4 // 3.02 // WAS 3 // 2.97
262262
}
263263

264264
(* Backward *)
@@ -279,7 +279,7 @@ type Tests(testOutputHelper) =
279279
verifyCorrectEventsBackward 4L expected res
280280

281281
test <@ [EqxAct.ResponseBackward; EqxAct.QueryBackward] = capture.ExternalCalls @>
282-
verifyRequestChargesMax 4 // 3.04 // WAS 3
282+
verifyRequestChargesMax 6 // 5.75 // WAS 4 // 3.04 // WAS 3
283283
}
284284

285285
[<AutoData(SkipIfRequestedViaEnvironmentVariable="EQUINOX_INTEGRATION_SKIP_COSMOS")>]
@@ -323,5 +323,5 @@ type Tests(testOutputHelper) =
323323
| EqxEvent (Equinox.Cosmos.Store.Log.Event.Query (Equinox.Cosmos.Store.Direction.Backward, responses, { count = c })) -> Some (responses,c)
324324
| _ -> None
325325
[1,5] =! capture.ChooseCalls queryRoundTripsAndItemCounts
326-
verifyRequestChargesMax 4 // 3.04 // WAS 3 // 2.98
327-
}
326+
verifyRequestChargesMax 6 // 5.76 // WAS 4 // 3.04 // WAS 3 // 2.98
327+
}

0 commit comments

Comments
 (0)