Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45506

Add custom generated messages for assert.soon & siblings

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • None
    • Sharding

      Currently, assert.soon accepts a message as a parameter. However, the string is a fixed message that is constructed during the call to assert.soon. It would be nice to have some way of constructing helpful error messages when assert.soon timeout is triggered.

      Something like this or better:

      let str = "msg";
      assert.soon(() => {
        str = "I changed msg";
        return false;
      }, () => { return str; });
      

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: