hyperledger / caliper

A blockchain benchmark framework to measure performance of multiple blockchain solutions https://wiki.hyperledger.org/display/caliper
https://hyperledger.github.io/caliper/
Apache License 2.0
651 stars 404 forks source link

Test flake in unit tests #1594

Closed davidkel closed 3 months ago

davidkel commented 3 months ago
AssignedMessage
    Constructor
      ✓ should create an AssignedMessage instance with sender, recipients, and type
      ✓ should set the content of the message as an empty object
      ✓ should parse the date argument as a Date object for the AssignedMessage
      ✓ should set the error correctly if passed
      ✓ should create an AssignedMessage with undefined date and error if not provided

  Message
    Constructor
      ✓ should create a Message instance with sender, recipients, type, content, date, and error
      ✓ should set the date of the message as undefined not passed
      ✓ should set the date of the message as an invalid Date object if the date is invalid
    Getters
      ✓ should get the sender of the message
      ✓ should get the recipients of the message
      ✓ should get the type of the message
      ✓ should get the content of the message
    hasError
      ✓ should return true if the message has an error
      ✓ should return false if the message has no error
    forRecipient
      ✓ should return true if the message is for the recipient
      ✓ should return true for all people if the message if for all
      ✓ should return false if the message is not for the recipient
    stringify
      ✓ should contain the date and the error if present
      ✓ should not include the error attribute if the message had no error
      1) should set the current date if the date is not provided

I'm guessing the failure occurs because of a timing situation where the time has shifted enough to cause it to fail as this only happens rarely. But as the tests are run as part of the merge and publish step. It means that an unstable build is not published.

davidkel commented 3 months ago

fixed now