nighthawk icon indicating copy to clipboard operation
nighthawk copied to clipboard

process_test unit test behaves differently on CI and local machine

Open eric846 opened this issue 4 years ago • 1 comments

https://github.com/envoyproxy/nighthawk/blob/e6f9af70d446ee018f1d72f8e46b8c1a22c186f4/test/process_test.cc#L279

With TimestampToNanoseconds, passes on CI but fails on my machine with error:

test/process_test.cc:278: Failure
Expected equality of these values:
  Envoy::ProtobufUtil::TimeUtil::TimestampToNanoseconds( output.results()[0].execution_start())
    Which is: 1610660382038451000
  options_->scheduled_start().value().time_since_epoch().count()
    Which is: 1610660382038451

With TimestampToMicroseconds, passes on my machine but fails on CI, with a similar error.

eric846 avatar Jan 14 '21 20:01 eric846

The cause might be related to the different resolution of system_clock by llvm and gcc, ms vs ns.

oschaaf avatar Jan 14 '21 20:01 oschaaf