From afc06e13c345e54f88721eb08c1c54d3470adeab Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Wed, 17 Nov 2021 16:48:06 -0800 Subject: [PATCH] Add debug only failure so CI can catch issues where sqlite isn't loading for some reasons --- .../Storage/SQLite/v2/SQLitePersistentStorageService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Workspaces/Core/Portable/Storage/SQLite/v2/SQLitePersistentStorageService.cs b/src/Workspaces/Core/Portable/Storage/SQLite/v2/SQLitePersistentStorageService.cs index 7530be69cad0d..159ac34835bf8 100644 --- a/src/Workspaces/Core/Portable/Storage/SQLite/v2/SQLitePersistentStorageService.cs +++ b/src/Workspaces/Core/Portable/Storage/SQLite/v2/SQLitePersistentStorageService.cs @@ -4,6 +4,7 @@ using System; using System.Composition; +using System.Diagnostics; using System.IO; using System.Threading; using System.Threading.Tasks; @@ -54,6 +55,10 @@ private static bool TryInitializeLibrariesLazy() catch (Exception e) when (e is DllNotFoundException or EntryPointNotFoundException) { StorageDatabaseLogger.LogException(e); + + // In debug also insta fail here. That way if there is an issue with sqlite (for example with authoring, + // or with some particular configuration) that get CI coverage that reveals this. + Debug.Fail("Sqlite failed to load: " + e); return false; }