Skip to content

Commit

Permalink
Fix RedisProfilerEntryToActivityConverterTests for UTC offset > 0. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Oberon00 authored Jan 11, 2021
1 parent 60566b6 commit 71290dc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public void ProfilerCommandToActivity_UsesIpEndPointAsEndPoint()
var activity = new Activity("redis-profiler");
IPEndPoint ipLocalEndPoint = new IPEndPoint(address, port);
var profiledCommand = new Mock<IProfiledCommand>();
profiledCommand.Setup(m => m.CommandCreated).Returns(DateTime.UtcNow);
profiledCommand.Setup(m => m.EndPoint).Returns(ipLocalEndPoint);

var result = RedisProfilerEntryToActivityConverter.ProfilerCommandToActivity(activity, profiledCommand.Object);
Expand All @@ -148,6 +149,7 @@ public void ProfilerCommandToActivity_UsesDnsEndPointAsEndPoint()

var activity = new Activity("redis-profiler");
var profiledCommand = new Mock<IProfiledCommand>();
profiledCommand.Setup(m => m.CommandCreated).Returns(DateTime.UtcNow);
profiledCommand.Setup(m => m.EndPoint).Returns(dnsEndPoint);

var result = RedisProfilerEntryToActivityConverter.ProfilerCommandToActivity(activity, profiledCommand.Object);
Expand All @@ -165,6 +167,7 @@ public void ProfilerCommandToActivity_UsesOtherEndPointAsEndPoint()
var unixEndPoint = new UnixDomainSocketEndPoint("https://opentelemetry.io/");
var activity = new Activity("redis-profiler");
var profiledCommand = new Mock<IProfiledCommand>();
profiledCommand.Setup(m => m.CommandCreated).Returns(DateTime.UtcNow);
profiledCommand.Setup(m => m.EndPoint).Returns(unixEndPoint);

var result = RedisProfilerEntryToActivityConverter.ProfilerCommandToActivity(activity, profiledCommand.Object);
Expand Down

0 comments on commit 71290dc

Please sign in to comment.