You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch proxy zip thread-locking to use process-locking instead because -n=NUM adds parallel processes (not threads)
This is for a very specific edge case when running tests using parallel process that require the use of a proxy server that requires authentication. One way to handle proxy server authentication on Chrome is by creating a Chrome Extension zip file at runtime with the necessary proxy credentials. I've already done this by implementing https://stackoverflow.com/a/35293284 in realtime by creating the zip file after a user launches tests with proxy settings (--proxy=USER:PASS@SERVER:PORT). Currently, I'm using thread-locking to make sure that two parallel tests don't try to create the same zip file at the same time. I've recently learned that -n=NUM actually uses multiple parallel processes, which is different from using multiple parallel threads. Therefore, I should update the locking mechanism to use process-locking instead of thread-locking. I haven't encountered any issues with this yet (the probability is small of that overlap window happening), but I better play it safe to make sure that issues with file writing can never happen here.