diff --git a/Duplicati/UnitTest/RemoteSynchronizationModuleTests.cs b/Duplicati/UnitTest/RemoteSynchronizationModuleTests.cs index 1d3535ff4..42a35d766 100644 --- a/Duplicati/UnitTest/RemoteSynchronizationModuleTests.cs +++ b/Duplicati/UnitTest/RemoteSynchronizationModuleTests.cs @@ -914,36 +914,6 @@ namespace Duplicati.UnitTest Assert.AreEqual(0, count); } - [Test] - [Category("RemoteSync")] - public void TestOnFinish_WithRunException_StillRecordsSync() - { - var module = new RemoteSynchronizationModule(); - var options = new Dictionary - { - ["remote-sync-dst"] = "invalid://dest", // Invalid URL to cause exception - ["dbpath"] = DBFILE - }; - module.Configure(options); - string remoteurl = "file:///source"; - string[] localpath = new string[0]; - module.OnStart("Backup", ref remoteurl, ref localpath); - - // Create Operation table - using var db = SQLiteLoader.LoadConnection(DBFILE); - using var cmd = db.CreateCommand(); - cmd.CommandText = "CREATE TABLE IF NOT EXISTS \"Operation\" (\"Description\" TEXT, \"Timestamp\" INTEGER)"; - cmd.ExecuteNonQuery(); - - var result = new TestBasicResults(ParsedResultType.Success); - module.OnFinish(result, null); - - // Check that sync was recorded even if Run threw exception - cmd.CommandText = "SELECT COUNT(*) FROM \"Operation\" WHERE \"Description\" = 'Rsync 0'"; - var count = (long)cmd.ExecuteScalar(); - Assert.AreEqual(1, count); - } - [Test] [Category("RemoteSync")] public void TestRecordSyncOperation_WithMissingTable_ThrowsException()