Skip to Content

Name: [FIX] point_of_sale, pos_loyalty: make opening-control and next order coupon tours robust on slow runners

State: Failed finished in 159m

PR State: merged

PR Author: David Tran

PR Author Email:

PR: #1318

Committer: David Tran

Committer Email: david.tran@tvtmarine.com

Commit: 1f9f1aff399e3362f4acfac5dd2398a43bb30901

Description:

                                            [FIX] pos_loyalty: make the next order coupon tours robust on slow runners

PosLoyaltyTour11.1 reloads the page right after the receipt "done" synchronization
while it can still be in flight: the reloaded page replays the order, which
stays in the cache without new_coupon_info, and the Paid filter never reads it
again ("Next order coupon is missing"). The last step also read the paid order
once, while the navbar spinner it waited on is cleared by whichever concurrent
request ends first, so the order could still be missing from the model
(TypeError reading 'new_coupon_info'). PosLoyaltyTour6 has the same reload
after payment. Runbot build 225871 (subbuild 427841) failed on the first
attempt; build 225816 (subbuild 427570) failed attempts 1 and 2.

Wait for the synchronization to end before every reload, and make the last step
wait until the paid order carries the coupon information instead of reading it
once. Reproduced on core with latency injected in sync_from_ui, notify_synchronisation
and read_pos_orders: the tours failed before the fix and pass after it.

Signed-off-by: David Tran <david.tran@tvtmarine.com>
                                            

Branch: 19.0

Age:

Up-time: