fix(app): build update links from the releases repository address (#7)
CI / Build and test (push) Canceled after 2m45s
CI / PostgreSQL 16 integration (push) Canceled after 0s
CI / PostgreSQL 17 integration (push) Canceled after 0s
CI / Docker image (push) Canceled after 0s
CI / YAML check (push) Canceled after 0s
CI / Windows tests and installer (push) Canceled after 0s
CI / Build and test (push) Canceled after 2m45s
CI / PostgreSQL 16 integration (push) Canceled after 0s
CI / PostgreSQL 17 integration (push) Canceled after 0s
CI / Docker image (push) Canceled after 0s
CI / YAML check (push) Canceled after 0s
CI / Windows tests and installer (push) Canceled after 0s
Gitea writes a release's html_url and browser_download_url with its ROOT_URL, which on the owner's server is the plain-http LAN address http://192.168.30.23:3000. The update check accepts only https links, so it ignored v0.1.0-rc.1 entirely. The page and download links now come from ChronosReleasesUrl, the address the build names for its users; only the tags, file names and sizes are read from Gitea's answer. The lease renewal test's timer periods follow TestTiming too: on the shared CI host a 100 ms renewal timer came 700 ms late once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #7.
This commit is contained in:
1 parent
f2b58522b9
commit
f80fc148bf
7 files changed
+73
-20
No files matched your search
@@ -66,12 +66,14 @@ public sealed class LeaseFileTests(TestContext context)
|
||||
public async Task AHeldLeaseIsRenewedPastItsDuration()
|
||||
{
|
||||
var locks = context.CreateTempDirectory();
|
||||
using var lease = LeaseFile.TryAcquire(locks, "seq-1", "server", TimeSpan.FromMilliseconds(300));
|
||||
// Renewals run on timers: a busy CI host delays them, so the lease's duration stretches with the time budgets.
|
||||
var duration = TimeSpan.FromSeconds(TestTiming.Budget(0.3));
|
||||
using var lease = LeaseFile.TryAcquire(locks, "seq-1", "server", duration);
|
||||
Assert.NotNull(lease);
|
||||
await Task.Delay(900);
|
||||
await Task.Delay(duration * 3);
|
||||
Assert.True(lease.IsHeld);
|
||||
Assert.Greater((LeaseFile.Read(lease.Path)!.Expires - DateTimeOffset.UtcNow).TotalMilliseconds, 0);
|
||||
Assert.Null(LeaseFile.TryAcquire(locks, "seq-1", "client", TimeSpan.FromMilliseconds(300)));
|
||||
Assert.Null(LeaseFile.TryAcquire(locks, "seq-1", "client", duration));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in new issue
Block a user