diff --git a/src/tests/async/synchronization-context/synchronization-context.cs b/src/tests/async/synchronization-context/synchronization-context.cs index e3a5e2eed606b4..d1b053cd7ebf0a 100644 --- a/src/tests/async/synchronization-context/synchronization-context.cs +++ b/src/tests/async/synchronization-context/synchronization-context.cs @@ -40,8 +40,11 @@ private static async Task TestSyncContextContinueAsync() await WrappedYieldToThreadPool(suspend: false).ConfigureAwait(false); Assert.Same(context, SynchronizationContext.Current); - await WrappedYieldToThreadPool(suspend: true).ConfigureAwait(false); - Assert.Null(SynchronizationContext.Current); + // Currently disabled since ConfigureAwait does not become a runtime async call, + // and this has a race condition until it does (where the callee finishes before + // we check IsCompleted on the awaiter). + //await WrappedYieldToThreadPool(suspend: true).ConfigureAwait(false); + //Assert.Null(SynchronizationContext.Current); await WrappedYieldToThreadWithCustomSyncContext(); Assert.Null(SynchronizationContext.Current);