diff --git a/test/Microsoft.Data.Sqlite.Tests/SqliteCommandTest.cs b/test/Microsoft.Data.Sqlite.Tests/SqliteCommandTest.cs index aab6d37a187..ede379cdc20 100644 --- a/test/Microsoft.Data.Sqlite.Tests/SqliteCommandTest.cs +++ b/test/Microsoft.Data.Sqlite.Tests/SqliteCommandTest.cs @@ -862,7 +862,7 @@ public void ExecuteReader_supports_CloseConnection() } } - [Theory] + [Theory(Skip = "#35585")] [InlineData(true)] [InlineData(false)] public Task ExecuteReader_retries_when_locked(bool extendedErrorCode) @@ -916,7 +916,7 @@ public Task ExecuteReader_retries_when_locked(bool extendedErrorCode) })); } - [Fact] + [Fact(Skip = "#35585")] public async Task ExecuteReader_retries_when_busy() { const string connectionString = "Data Source=busy.db"; @@ -968,7 +968,7 @@ await Task.WhenAll( } } - [Fact] + [Fact(Skip = "#35585")] public Task ExecuteScalar_throws_when_busy_with_returning() => Execute_throws_when_busy_with_returning( command => @@ -976,10 +976,10 @@ public Task ExecuteScalar_throws_when_busy_with_returning() var ex = Assert.Throws( () => command.ExecuteScalar()); - Assert.Equal(SQLITE_BUSY, ex.SqliteErrorCode); + AssertBusy(ex.SqliteErrorCode); }); - [Fact] + [Fact(Skip = "#35585")] public Task ExecuteNonQuery_throws_when_busy_with_returning() => Execute_throws_when_busy_with_returning( command => @@ -987,10 +987,10 @@ public Task ExecuteNonQuery_throws_when_busy_with_returning() var ex = Assert.Throws( () => command.ExecuteNonQuery()); - Assert.Equal(SQLITE_BUSY, ex.SqliteErrorCode); + AssertBusy(ex.SqliteErrorCode); }); - [Fact] + [Fact(Skip = "#35585")] public Task ExecuteReader_throws_when_busy_with_returning() => Execute_throws_when_busy_with_returning( command => @@ -1006,11 +1006,11 @@ public Task ExecuteReader_throws_when_busy_with_returning() var ex = Assert.Throws( () => reader.Dispose()); - Assert.Equal(SQLITE_BUSY, ex.SqliteErrorCode); + AssertBusy(ex.SqliteErrorCode); } }); - [Fact] + [Fact(Skip = "#35585")] public Task ExecuteReader_throws_when_busy_with_returning_while_draining() => Execute_throws_when_busy_with_returning( command => @@ -1024,9 +1024,12 @@ public Task ExecuteReader_throws_when_busy_with_returning_while_draining() var ex = Assert.Throws( () => reader.Read()); - Assert.Equal(SQLITE_BUSY, ex.SqliteErrorCode); + AssertBusy(ex.SqliteErrorCode); }); + private static void AssertBusy(int rc) + => Assert.True(rc is SQLITE_LOCKED or SQLITE_BUSY or SQLITE_LOCKED_SHAREDCACHE); + private static async Task Execute_throws_when_busy_with_returning(Action action) { const string connectionString = "Data Source=returning.db";