Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-648 New AsyncRewriter Approach
  3. MONGOSH-655

Update java-shell to expect Promises for @returnsPromise

    • Type: Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.10.0
    • Affects Version/s: None
    • Component/s: Java Shell
    • None
    • Iteration Yucca, Iteration Z
    • Not Needed

      The java-shell source code currently does not expect every function labelled with @returnsPromise to actually return a Promise, and instead relies on the synchronous result from its own service provider being passed along. This requires us to do a small hack in the @returnsPromise decorator.

      We should:

      • Be consistent and make sure that all methods labelled with @returnsPromise actually return a Promise, e.g. by making them async functions (we could test that)
      • Update the java-shell to handle those cases where it doesn’t already.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: