<div dir="ltr">Hi Jakob,<div><br></div><div>Unrelated to your concern about Notifications, I notice the test assigns p to the result of sending #value to the Promise, which will very possibly still be nil at that point, even though it then goes on to test it against #isResolved and #isRejected right afterward.</div><div><br></div><div>I find the impedance mismatch between values and Promises of values confusing, too, -- afterall, I thought the purpose was to be able to use them interchangeably.  Equally, I wish 'error' were always some kind of Exception, and would signal it when #value (wait) was sent instead of exposing Promises by forcing clients to ask, #isRejected?  #isResolved?</div><div><br></div><div> - Chris</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 21, 2020 at 12:46 PM Jakob Reschke <<a href="mailto:forums.jakob@resfarm.de">forums.jakob@resfarm.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am trying to come up with a nice solution for this failing test.<br>
<br>
Am So., 21. Juni 2020 um 19:27 Uhr schrieb <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>>:<br>
><br>
> A new version of KernelTests was added to project The Inbox:<br>
> <a href="http://source.squeak.org/inbox/KernelTests-jr.383.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/KernelTests-jr.383.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: KernelTests-jr.383<br>
> Author: jr<br>
> Time: 21 June 2020, 7:27:47.560506 pm<br>
> UUID: ecddb3cb-25c9-6c43-a879-59e527a3a9ee<br>
> Ancestors: KernelTests-tonyg.382<br>
><br>
> Test whether Notifications reject the promises of future sends<br>
><br>
> In my opinion, they should not.<br>
><br>
> =============== Diff against KernelTests-tonyg.382 ===============<br>
><br>
> Item was added:<br>
> + ----- Method: PromiseTest>>testFutureResolutionWithNotification (in category 'tests - future') -----<br>
> + testFutureResolutionWithNotification<br>
> +       | p |<br>
> +       p := [Notification signal: 'should not reject'. 3 + 4] future value.<br>
> +       self assert: (self waitUntil: [p isResolved or: [p isRejected]] orCycleCount: 100).<br>
> +       self assert: p isResolved.<br>
> +       self assert: 7 equals: p value.!<br>
><br>
><br>
<br>
</blockquote></div>