envoyproxy / nighthawk

L7 (HTTP/HTTPS/HTTP2/HTTP3) performance characterization tool
Apache License 2.0
361 stars 81 forks source link

process_test unit test behaves differently on CI and local machine #605

Open eric846 opened 3 years ago

eric846 commented 3 years ago

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.

oschaaf commented 3 years ago

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