Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test failure
* test was attempting to parse ints when the interval
 can be a double
  • Loading branch information
John Salem committed Jul 6, 2021
commit 0dd2832f37254a66bc1f3396c1cebdf9abb8f181
6 changes: 3 additions & 3 deletions src/tests/tracing/eventcounter/regression-25709.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class SimpleEventListener : EventListener
{
private readonly EventLevel _level = EventLevel.Verbose;

public int MaxIncrement { get; private set; } = 0;
public double MaxIncrement { get; private set; } = 0;

public SimpleEventListener()
{
Expand All @@ -38,7 +38,7 @@ protected override void OnEventSourceCreated(EventSource source)

protected override void OnEventWritten(EventWrittenEventArgs eventData)
{
int increment = 0;
double increment = 0;
bool isExceptionCounter = false;

for (int i = 0; i < eventData.Payload.Count; i++)
Expand All @@ -52,7 +52,7 @@ protected override void OnEventWritten(EventWrittenEventArgs eventData)
isExceptionCounter = true;
if (payload.Key.Equals("Increment"))
{
increment = Int32.Parse(payload.Value.ToString());
increment = double.Parse(payload.Value.ToString());
}
}
if (isExceptionCounter)
Expand Down