MemberService: Fix flaky tests
Test / Run tests (push) Successful in 2m29s

This commit is contained in:
lorenz.stechauner committed 2026-11-27 11:54:11 +01:00
1 parent 51a05fe4db
commit f1e8907d40
2 files changed
+7

No files matched your search

+5
View File
@@ -2,6 +2,7 @@ using Microsoft.Data.Sqlite;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Windows;
namespace Elwig.Services {
@@ -147,6 +148,10 @@ namespace Elwig.Services {
text += exc.Message + (showExcType ? $" ({exc.GetType().Name})" : "");
if (exc.InnerException != null) text += "\n\n" + exc.InnerException.Message;
}
if (App.Config.Debug && exc.StackTrace != null) {
var m = Regex.Match(exc.StackTrace, @"\\([^:\\]*):line ([0-9]+)");
if (m != null) text += "\n\n" + m.Groups[1] + ": line " + m.Groups[2];
}
if (isError) {
ShowError(title, text);
} else {
+2
View File
@@ -172,6 +172,7 @@ namespace Elwig.Services {
vm.StatusAreaCommitmentToolTip = null;
Utils.RunBackground("Mitgliederdaten laden", async () => {
if (App.Current?.Dispatcher == null) return;
using var ctx = new AppDbContext();
var d1 = ctx.Deliveries.Where(d => d.Year == Utils.CurrentLastSeason - 1 && d.MgNr == m.MgNr);
@@ -222,6 +223,7 @@ namespace Elwig.Services {
} else {
vm.OrganicDetails = "...";
Utils.RunBackground("Bio-Zertifikatsdaten laden", async () => {
if (App.Current?.Dispatcher == null) return;
var certs = await OrganicService.GetTracesCertificates(m);
await App.Current.Dispatcher.BeginInvoke(() => {
if (m.MgNr != vm.MgNr) return;