Daily updates from Odoo
Thursday, March 6, 2025
1 change
Enhancements to existing features
This update improves internal testing for the Point of Sale restaurant features by allowing multiple guided test sessions to run at the same time. It helps verify that shared restaurant orders stay synchronized across different browser sessions, reducing the risk of issues in real-world multi-device use.
Original PR description
This PR aims to add a way to run multiple tours in parallel in order to test the synchronization feature in the `pos_restaurant` module. The introduced `run_parallel_tours` method runs the given prepared tours in different threads. But in order to do this, we need to make changes around: - the SIGXCPU signal handling, and, - the authentication For simplicity, we kept the authentication behavior such that it only works for one user. So in this implementation, all the opened browsers share the same user and session. As for the SIGXCPU signal handling, setting the signal handler can only be done in the main thread. So we introduced a context manager that sets the custom SIGXCPU handler when starting the tours and restores the previous signal handler when the tours are finished.