Commit Graph
72 Commits
Author SHA1 Message Date
Kenneth Skovhede efac1ed06e Added extra info tro track a rare unittest failure 2026-02-06 14:37:01 +01:00
Carl Johnsen f6ac30e831 Merge remote-tracking branch 'upstream/master' into performance/mssqlite-async 2025-06-19 12:17:30 +02:00
Carl Johnsen 2412800c0c Removed the sqlite page cache option. It should be set through the environment variable, or some other way of providing a custom database configurotion 2025-06-19 11:41:39 +02:00
Carl Johnsen 78d649f5a3 All of the non-internal-library methods calling the database functions forwards CancellationToken.None 2025-06-19 11:00:24 +02:00
Kenneth Skovhede 8fca01f64f Updated NUnit
This closes #4939
2025-06-13 11:48:24 +02:00
Carl Johnsen 239d7370cd Removed whitespace 2025-06-02 11:50:44 +02:00
Carl Johnsen caa3c13dbe Post master merge fixes 2025-06-02 11:50:35 +02:00
Kenneth SkovhedeandGitHub 171eb1bb12 Merge branch 'master' into feature/add-sqlite-cache-value 2025-04-23 16:34:55 +02:00
Kenneth Skovhede edca083cc9 Extended tests to ensure they cover what they are supposed to cover 2025-04-23 15:40:06 +02:00
Kenneth SkovhedeandGitHub 0c4fffa6ce Merge branch 'master' into feature/add-sqlite-cache-value 2025-04-23 15:25:00 +02:00
Kenneth Skovhede 3ed195d821 Updated tests 2025-04-23 11:49:06 +02:00
Kenneth Skovhede 0a7a1cd689 Added option to set the SQLite page cache
This adds an extra option to allow setting the SQLite page cache size as a regular option.

Prior to this commit it was only possible to set the SQLite page cache size via environment variables.

The option to use environment variables is preserved, and as options from the environment variable are applied after the new setting, environment variables take precedence.

The default value for the new option is to use 1% of the system memory for the page cache. For the restore process, a connection per worker may be made which defaults to half the number of cores, so the maximum amount of memory is 1% * half the CPU cores.

This is just the upper limit, and SQLite may choose not to use all of it.

This fixes #6178
2025-04-22 14:26:46 +02:00
Kenneth Skovhede 49cb6f01fb Added logging to catch CI-only failure 2025-04-16 08:05:38 +02:00
marceloduplicatiandGitHub c4600e4237 Merge pull request #6033 from marceloduplicati/feature/fix-to-stop-unit-test
Fix to StopNow tests
2025-03-12 12:18:44 -03:00
Marcelo C. 64d40ef0ea Fix to StopNow tests
Since the core changes in the cancelation process where now cancellationTokens are observed rather than a thread.abort attempt, the expected exception is now OperationCanceledException when calling .Abort on the controller.

Also eliminated the time based awaiting to abort in favor of monitoring the backup phase to ensure the .Abort happens after the controller has had time to initiate the backend and backend is at Backup_ProcessingFiles state.
2025-03-12 10:40:20 -03:00
Kenneth Skovhede 5d45baacbf Renamed tests away from "Failed" to make searching for failed tests easier. 2025-03-10 22:04:48 +01:00
Kenneth Skovhede c673cba607 Cleanups in tests 2025-03-10 14:39:31 +01:00
Kenneth Skovhede 599203a269 Added check to see that injected failure is actually triggered 2025-03-09 22:01:01 +01:00
Kenneth Skovhede 12cabf8da7 Merge branch 'feature/improved-failure-resilience' of github.com:duplicati/duplicati into feature/improved-failure-resilience 2025-03-08 15:28:24 +01:00
Kenneth Skovhede d019845fad Added a number of new tests to ensure correct handling of edge cases related to missing/interrupted uploads. 2025-03-08 15:14:03 +01:00
Kenneth SkovhedeandGitHub f6d8ed83f0 Merge branch 'master' into feature/improved-failure-resilience 2025-03-06 22:32:37 +01:00
Kenneth Skovhede d75e690495 Fixed not being dependent on filesystem order 2025-03-06 18:26:56 +01:00
Kenneth Skovhede e3727d8f18 Finding list of modified files to trace the error 2025-03-06 15:22:57 +01:00
Kenneth Skovhede 774e468287 Placed modify correctly 2025-03-06 15:12:38 +01:00
Kenneth Skovhede 7beeb27ade Extended tests and fixed a case where a left-over upload could cause errors. 2025-03-06 14:53:46 +01:00
Kenneth Skovhede 277362ce64 Another attempt at fixing the failing tests 2025-03-06 10:48:52 +01:00
Kenneth Skovhede be0d74fe2e Attempt to make test more stable 2025-03-05 10:01:08 +01:00
Kenneth Skovhede 78b45eb983 Added additional tests for OperationCancelledException
(cherry picked from commit 30568f0498)
2025-03-04 16:37:24 +01:00
Kenneth Skovhede 655f5ef635 Added interuption test
This adds a test with a failed upload.

The failed upload is done in parallel, so (at least) one of the uploads succeeeds and one upload fails.

The backup then errors, but a subsequent backup continues without errors and creates a synthetic filelist.

Also refactored the DeterministicErrorBackend to not use magic strings.
And made it actually deterministic.
2025-02-20 11:00:28 +01:00
Kenneth SkovhedeandGitHub f7b7555e87 Fixes for tests (#5918)
* Two small test fixes

* Ignore exceptions when comitting an empty transaction

* Attempt to fix FTP connection issue

* Unified test by having a single download function.
Added DNS probing call to attempt fixing sporadic DNS errors.

* Fixed argument order

* Avoid creating temp file during tests, if not needed
2025-01-28 08:55:28 +01:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Carl Johnsen 4b0033d8e8 Fixed bug where if the parent folder contained the name "10", the DisruptionTests.FilesetFiles test would fail 2024-12-20 08:23:32 +01:00
Kenneth SkovhedeandGitHub ff1b2b7990 Simplified task control (#5753)
* Simplified task control by having all logic in a single class and using async control mechanism
* Fixed the tests
* Made the marking of a backup partial explicitly communicated if the enumeration process is stopped.
* Added support for pausing active transfers
* Introduced transfer token to abort operations.
* Updated the way LiveControl is emitting events.
* Retains the paused state of the server across reboots, this fixes #5760.
* Reworked the way throttle speeds are propagated through LiveControls.
* Added option to pause transfers in the UI.
* Removed throttle settings from the LiveControls class so it is exclusively handled by the ApplicationSettings.
* Removed `thread-priority` as it does not work at all when tasks are used.
* Fixed the stop dialog and API to only support stop and abort.
* Removed unused variables
2024-12-18 08:27:59 +01:00
Suguru Hirahara ae57dee0f0 Remove redundant space characters from *.cs and *.html 2024-07-26 00:10:31 -04:00
Kenneth Skovhede fcc95fa936 Fixed flaky test 2024-04-18 11:49:39 +02:00
Kenneth Skovhede 473c6cbbb8 Merge commit '4f577c65a4d8806f79637c50c21ca3a683c5a07a' into feature/kestrel-avalonia-upgrade 2024-03-04 12:21:53 +01:00
Kenneth Skovhede d7f027b9e2 Fixed usings in unit tests 2024-03-03 15:41:49 +01:00
Kenneth Skovhede aa20088c39 Tool based upgrade of all projects with some manual update 2024-03-01 14:29:54 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Thomas Suckow 5956b771f0 Cleanup inconsistent overrides of test SetUp and TearDown.
Also add some memory usage diagnostics
2022-05-05 22:30:15 -07:00
Dean Ferreyra f4195e4eb0 Address review comments from @warwickmm
Replace `VerifyDir` and `CompareFiles` with
`AssertDirectoryTreesAreEquivalent` and `AssertFilesAreEqual`.

Move `WriteFile` to `TestUtils`.

Add "Symlink" category to start.sh.
2020-09-11 20:06:53 -07:00
Kenneth Hsu e1a6ae4483 Check operation results for errors and warnings in tests. 2020-07-05 18:50:10 -07:00
Sean Templeton d5e064ae45 Fix a few more issues with stop now
When a backup is interrupted it will now show as a partial backup in the list of backups on the restore files page.

Temporary filelist volumes are protected from deletion in several places. All but the RestoreHandler
only protect the most recent filelist. The RestoreHandler protects all temporary filelist volumes as the user
might be restoring from one that would be deleted.

Prevent the CoCoL BackendRequests channel is retired exception from appearing when the backup is stopped by checking
if the channel is retired before trying to add the FlushRequest to the channel. Any exceptions from the BackendUploader
task will still be thrown.
2020-03-01 21:19:07 -06:00
Sean Templeton 446120ae3e A synthetic filelist could not be uploaded due to the logic in UploadSyntheticFilelist. The code passing in the fileset id to the class would get the id based on if the volume was in the Temporary or Uploading states. If the volume was in the Uploading state, present on the remote backend, and of the right size it would get changed to Uploaded.
One of the first things UploadSyntheticFilelist does is throw an exception if the volume is not in the Uploaded state. Or if it is in the Uploaded state, the next check would prevent a synthetic filelist from being created if the volume was not in the Uploading or Temporary states.

Removed the check for the volume not being in the Uploaded state as the warning in the second check handles that case.

Removed the using statement as it would dispose of the FilesetVolumeWriter after passing it to the UploadChannel. The UploadChannel could not use it since it had been disposed.

Fixed the GetRemoteVolumeFromIDAsync taking a fileset id and matching it up against a volume id. Now it will use fileset id to get the volume that matches the fileset.

Change the StopNow disruption test to not use a synthetic file list. The test was written with it not working and therefore fails a check on the number of filesets after stopping a backup.

Bonus fix for a possible null exception in Dispose for VolumeWriterBase.
2020-02-23 16:50:36 -06:00
Kenneth Hsu f63e703a66 Add test for interrupting backup with "stop now". 2020-01-06 10:00:35 -08:00
warwickmmandGitHub 1663148479 Merge pull request #4034 from warwickmm/test/no_local_db_list
Add test for listing filesets without local database
2020-01-06 09:20:40 -08:00
Kenneth Hsu d3bcd3fb4a Add test for listing filesets without local database.
This test would have failed prior to the changes in revision 8ab64071f0
("Display correct backup type when using direct restore").  Prior to
revision 8ab64071f0, all filesets would have been marked as partial when
performing a direct restore without the local database.

This concerns issue #3982.
2019-12-30 16:35:41 -08:00
Kenneth Hsu 7494abec63 Add test to verify that fileset file exists after repair.
This test would have failed prior to the changes in revision 0cfce6be39
("Include fileset file when repairing missing dlist file").

This concerns issue #3982.
2019-12-30 15:15:15 -08:00
Kenneth Hsu d3f752279f Add test to verify that fileset file exists after purge.
This test would have failed prior to the changes in revision 51b4ecfb28
("Include fileset file in dlist files after purge operation").

This concerns issue #3982.
2019-12-30 15:15:15 -08:00
Kenneth Hsu 7746ff1014 Fix derivation of seconds from TimeSpan.
Although the TimeSpan should be less than one minute, we should still
reference TotalSeconds to be safe.
2019-12-03 18:23:24 -08:00