Skip to content

Commit 816e9c0

Browse files
committed
increasing test timeout times
1 parent c81b0e5 commit 816e9c0

19 files changed

+94
-94
lines changed

src/ElectronNET.IntegrationTests/Tests/AppTests.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ public AppTests(ElectronFixture fx)
1717
this.fx = fx;
1818
}
1919

20-
[Fact(Timeout = 5000)]
20+
[Fact(Timeout = 20000)]
2121
public async Task Can_get_app_path()
2222
{
2323
var path = await Electron.App.GetAppPathAsync();
2424
path.Should().NotBeNullOrWhiteSpace();
2525
Directory.Exists(path).Should().BeTrue();
2626
}
2727

28-
[Fact(Timeout = 5000)]
28+
[Fact(Timeout = 20000)]
2929
public async Task Can_get_version_and_locale()
3030
{
3131
var version = await Electron.App.GetVersionAsync();
@@ -34,7 +34,7 @@ public async Task Can_get_version_and_locale()
3434
locale.Should().NotBeNullOrWhiteSpace();
3535
}
3636

37-
[Fact(Timeout = 5000)]
37+
[Fact(Timeout = 20000)]
3838
public async Task Can_get_special_paths()
3939
{
4040
var userData = await Electron.App.GetPathAsync(PathName.UserData);
@@ -47,7 +47,7 @@ public async Task Can_get_special_paths()
4747
}
4848

4949

50-
[Fact(Timeout = 5000)]
50+
[Fact(Timeout = 20000)]
5151
public async Task Badge_count_roundtrip_where_supported()
5252
{
5353
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
@@ -68,37 +68,37 @@ public async Task Badge_count_roundtrip_where_supported()
6868
}
6969
}
7070

71-
[Fact(Timeout = 5000)]
71+
[Fact(Timeout = 20000)]
7272
public async Task Can_get_app_metrics()
7373
{
7474
var metrics = await Electron.App.GetAppMetricsAsync();
7575
metrics.Should().NotBeNull();
7676
metrics.Length.Should().BeGreaterThan(0);
7777
}
7878

79-
[Fact(Timeout = 5000)]
79+
[Fact(Timeout = 20000)]
8080
public async Task Can_get_gpu_feature_status()
8181
{
8282
var status = await Electron.App.GetGpuFeatureStatusAsync();
8383
status.Should().NotBeNull();
8484
}
8585

86-
[Fact(Timeout = 5000)]
86+
[Fact(Timeout = 20000)]
8787
public async Task Can_get_login_item_settings()
8888
{
8989
var settings = await Electron.App.GetLoginItemSettingsAsync();
9090
settings.Should().NotBeNull();
9191
}
9292

93-
[Fact(Timeout = 5000)]
93+
[Fact(Timeout = 20000)]
9494
public async Task Can_set_app_logs_path()
9595
{
9696
var tempDir = Path.Combine(Path.GetTempPath(), "ElectronLogsTest" + Guid.NewGuid().ToString("N"));
9797
Directory.CreateDirectory(tempDir);
9898
Electron.App.SetAppLogsPath(tempDir);
9999
}
100100

101-
[Fact(Timeout = 5000)]
101+
[Fact(Timeout = 20000)]
102102
public async Task CommandLine_append_and_query_switch()
103103
{
104104
var switchName = "integration-switch";
@@ -107,7 +107,7 @@ public async Task CommandLine_append_and_query_switch()
107107
(await Electron.App.CommandLine.GetSwitchValueAsync(switchName)).Should().Be("value123");
108108
}
109109

110-
[Fact(Timeout = 5000)]
110+
[Fact(Timeout = 20000)]
111111
public async Task Accessibility_support_toggle()
112112
{
113113
Electron.App.SetAccessibilitySupportEnabled(true);
@@ -116,7 +116,7 @@ public async Task Accessibility_support_toggle()
116116
Electron.App.SetAccessibilitySupportEnabled(false);
117117
}
118118

119-
[Fact(Timeout = 5000)]
119+
[Fact(Timeout = 20000)]
120120
public async Task UserAgentFallback_roundtrip()
121121
{
122122
var original = await Electron.App.UserAgentFallbackAsync;
@@ -126,7 +126,7 @@ public async Task UserAgentFallback_roundtrip()
126126
Electron.App.UserAgentFallback = original; // restore
127127
}
128128

129-
[Fact(Timeout = 5000)]
129+
[Fact(Timeout = 20000)]
130130
public async Task BadgeCount_set_and_reset_where_supported()
131131
{
132132
await Electron.App.SetBadgeCountAsync(2);
@@ -136,14 +136,14 @@ public async Task BadgeCount_set_and_reset_where_supported()
136136
await Electron.App.SetBadgeCountAsync(0);
137137
}
138138

139-
[Fact(Timeout = 5000)]
139+
[Fact(Timeout = 20000)]
140140
public async Task App_metrics_have_cpu_info()
141141
{
142142
var metrics = await Electron.App.GetAppMetricsAsync();
143143
metrics[0].Cpu.Should().NotBeNull();
144144
}
145145

146-
[Fact(Timeout = 5000)]
146+
[Fact(Timeout = 20000)]
147147
public async Task App_badge_count_roundtrip()
148148
{
149149
// Set then get (non-mac platforms treat as no-op but should return0 or set value)
@@ -154,7 +154,7 @@ public async Task App_badge_count_roundtrip()
154154
(count ==3 || count ==0).Should().BeTrue();
155155
}
156156

157-
[Fact(Timeout = 5000)]
157+
[Fact(Timeout = 20000)]
158158
public async Task App_gpu_feature_status_has_some_fields()
159159
{
160160
var status = await Electron.App.GetGpuFeatureStatusAsync();

src/ElectronNET.IntegrationTests/Tests/AutoUpdaterTests.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public AutoUpdaterTests(ElectronFixture fx)
1212
this.fx = fx;
1313
}
1414

15-
[Fact(Timeout = 5000)]
15+
[Fact(Timeout = 20000)]
1616
public async Task AutoDownload_check()
1717
{
1818
Electron.AutoUpdater.AutoDownload = false;
@@ -23,7 +23,7 @@ public async Task AutoDownload_check()
2323
test2.Should().BeTrue();
2424
}
2525

26-
[Fact(Timeout = 5000)]
26+
[Fact(Timeout = 20000)]
2727
public async Task AutoInstallOnAppQuit_check()
2828
{
2929
Electron.AutoUpdater.AutoInstallOnAppQuit = false;
@@ -34,7 +34,7 @@ public async Task AutoInstallOnAppQuit_check()
3434
test2.Should().BeTrue();
3535
}
3636

37-
[Fact(Timeout = 5000)]
37+
[Fact(Timeout = 20000)]
3838
public async Task AllowPrerelease_check()
3939
{
4040
Electron.AutoUpdater.AllowPrerelease = false;
@@ -45,7 +45,7 @@ public async Task AllowPrerelease_check()
4545
test2.Should().BeTrue();
4646
}
4747

48-
[Fact(Timeout = 5000)]
48+
[Fact(Timeout = 20000)]
4949
public async Task FullChangelog_check()
5050
{
5151
Electron.AutoUpdater.FullChangelog = false;
@@ -56,7 +56,7 @@ public async Task FullChangelog_check()
5656
test2.Should().BeTrue();
5757
}
5858

59-
[Fact(Timeout = 5000)]
59+
[Fact(Timeout = 20000)]
6060
public async Task AllowDowngrade_check()
6161
{
6262
Electron.AutoUpdater.AllowDowngrade = false;
@@ -67,22 +67,22 @@ public async Task AllowDowngrade_check()
6767
test2.Should().BeTrue();
6868
}
6969

70-
[Fact(Timeout = 5000)]
70+
[Fact(Timeout = 20000)]
7171
public async Task UpdateConfigPath_check()
7272
{
7373
var test1 = Electron.AutoUpdater.UpdateConfigPath;
7474
test1.Should().Be(string.Empty);
7575
}
7676

77-
[Fact(Timeout = 5000)]
77+
[Fact(Timeout = 20000)]
7878
public async Task CurrentVersionAsync_check()
7979
{
8080
var semver = await Electron.AutoUpdater.CurrentVersionAsync;
8181
semver.Should().NotBeNull();
8282
semver.Major.Should().BeGreaterThan(0);
8383
}
8484

85-
[Fact(Timeout = 5000)]
85+
[Fact(Timeout = 20000)]
8686
public async Task ChannelAsync_check()
8787
{
8888
var test = await Electron.AutoUpdater.ChannelAsync;
@@ -92,7 +92,7 @@ public async Task ChannelAsync_check()
9292
test.Should().Be("beta");
9393
}
9494

95-
[Fact(Timeout = 5000)]
95+
[Fact(Timeout = 20000)]
9696
public async Task RequestHeadersAsync_check()
9797
{
9898
var headers = new Dictionary<string, string>
@@ -108,21 +108,21 @@ public async Task RequestHeadersAsync_check()
108108
test["key1"].Should().Be("value1");
109109
}
110110

111-
[Fact(Timeout = 5000)]
111+
[Fact(Timeout = 20000)]
112112
public async Task CheckForUpdatesAsync_check()
113113
{
114114
var test = await Electron.AutoUpdater.CheckForUpdatesAsync();
115115
test.Should().BeNull();
116116
}
117117

118-
[Fact(Timeout = 5000)]
118+
[Fact(Timeout = 20000)]
119119
public async Task CheckForUpdatesAndNotifyAsync_check()
120120
{
121121
var test = await Electron.AutoUpdater.CheckForUpdatesAsync();
122122
test.Should().BeNull();
123123
}
124124

125-
[Fact(Timeout = 5000)]
125+
[Fact(Timeout = 20000)]
126126
public async Task GetFeedURLAsync_check()
127127
{
128128
var test = await Electron.AutoUpdater.GetFeedURLAsync();

src/ElectronNET.IntegrationTests/Tests/BrowserViewTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public BrowserViewTests(ElectronFixture fx)
1212
this.fx = fx;
1313
}
1414

15-
[Fact(Timeout = 5000)]
15+
[Fact(Timeout = 20000)]
1616
public async Task Create_browser_view_and_adjust_bounds()
1717
{
1818
var view = await Electron.WindowManager.CreateBrowserViewAsync(new BrowserViewConstructorOptions());

src/ElectronNET.IntegrationTests/Tests/BrowserWindowTests.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public BrowserWindowTests(ElectronFixture fx)
1414
this.fx = fx;
1515
}
1616

17-
[Fact(Timeout = 5000)]
17+
[Fact(Timeout = 20000)]
1818
public async Task Can_set_and_get_title()
1919
{
2020
const string title = "Integration Test Title";
@@ -23,7 +23,7 @@ public async Task Can_set_and_get_title()
2323
roundTrip.Should().Be(title);
2424
}
2525

26-
[Fact(Timeout = 5000)]
26+
[Fact(Timeout = 20000)]
2727
public async Task Can_resize_and_get_size()
2828
{
2929
this.fx.MainWindow.SetSize(643, 482);
@@ -33,7 +33,7 @@ public async Task Can_resize_and_get_size()
3333
size[1].Should().Be(482);
3434
}
3535

36-
[Fact(Timeout = 5000)]
36+
[Fact(Timeout = 20000)]
3737
public async Task Can_set_progress_bar_and_clear()
3838
{
3939
this.fx.MainWindow.SetProgressBar(0.5);
@@ -42,7 +42,7 @@ public async Task Can_set_progress_bar_and_clear()
4242
await Task.Delay(50);
4343
}
4444

45-
[Fact(Timeout = 5000)]
45+
[Fact(Timeout = 20000)]
4646
public async Task Can_set_and_get_position()
4747
{
4848
this.fx.MainWindow.SetPosition(134, 246);
@@ -51,7 +51,7 @@ public async Task Can_set_and_get_position()
5151
pos.Should().BeEquivalentTo([134, 246]);
5252
}
5353

54-
[Fact(Timeout = 5000)]
54+
[Fact(Timeout = 20000)]
5555
public async Task Can_set_and_get_bounds()
5656
{
5757
var bounds = new Rectangle { X = 10, Y = 20, Width = 400, Height = 300 };
@@ -63,7 +63,7 @@ public async Task Can_set_and_get_bounds()
6363
round.Height.Should().Be(300);
6464
}
6565

66-
[Fact(Timeout = 5000)]
66+
[Fact(Timeout = 20000)]
6767
public async Task Can_set_and_get_content_bounds()
6868
{
6969
var bounds = new Rectangle { X = 0, Y = 0, Width = 300, Height = 200 };
@@ -73,7 +73,7 @@ public async Task Can_set_and_get_content_bounds()
7373
round.Height.Should().BeGreaterThan(0);
7474
}
7575

76-
[Fact(Timeout = 5000)]
76+
[Fact(Timeout = 20000)]
7777
public async Task Show_hide_visibility_roundtrip()
7878
{
7979
this.fx.MainWindow.Show();
@@ -82,7 +82,7 @@ public async Task Show_hide_visibility_roundtrip()
8282
(await this.fx.MainWindow.IsVisibleAsync()).Should().BeFalse();
8383
}
8484

85-
[Fact(Timeout = 5000)]
85+
[Fact(Timeout = 20000)]
8686
public async Task AlwaysOnTop_toggle_and_query()
8787
{
8888
this.fx.MainWindow.SetAlwaysOnTop(true);
@@ -91,7 +91,7 @@ public async Task AlwaysOnTop_toggle_and_query()
9191
(await this.fx.MainWindow.IsAlwaysOnTopAsync()).Should().BeFalse();
9292
}
9393

94-
[Fact(Timeout = 5000)]
94+
[Fact(Timeout = 20000)]
9595
public async Task MenuBar_auto_hide_and_visibility()
9696
{
9797
this.fx.MainWindow.SetAutoHideMenuBar(true);
@@ -102,7 +102,7 @@ public async Task MenuBar_auto_hide_and_visibility()
102102
(await this.fx.MainWindow.IsMenuBarVisibleAsync()).Should().BeTrue();
103103
}
104104

105-
[Fact(Timeout = 5000)]
105+
[Fact(Timeout = 20000)]
106106
public async Task ReadyToShow_event_fires_after_content_ready()
107107
{
108108
var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false });
@@ -122,7 +122,7 @@ public async Task ReadyToShow_event_fires_after_content_ready()
122122
window.Show();
123123
}
124124

125-
[Fact(Timeout = 5000)]
125+
[Fact(Timeout = 20000)]
126126
public async Task PageTitleUpdated_event_fires_on_title_change()
127127
{
128128
var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = true });
@@ -142,7 +142,7 @@ public async Task PageTitleUpdated_event_fires_on_title_change()
142142
(await tcs.Task).Should().Be("NewTitle");
143143
}
144144

145-
[Fact(Timeout = 5000)]
145+
[Fact(Timeout = 20000)]
146146
public async Task Resize_event_fires_on_size_change()
147147
{
148148
var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false });
@@ -153,7 +153,7 @@ public async Task Resize_event_fires_on_size_change()
153153
resized.Should().BeTrue();
154154
}
155155

156-
[Fact(Timeout = 5000)]
156+
[Fact(Timeout = 20000)]
157157
public async Task Progress_bar_and_always_on_top_toggle()
158158
{
159159
var win = this.fx.MainWindow;
@@ -165,7 +165,7 @@ public async Task Progress_bar_and_always_on_top_toggle()
165165
(await win.IsAlwaysOnTopAsync()).Should().BeFalse();
166166
}
167167

168-
[Fact(Timeout = 5000)]
168+
[Fact(Timeout = 20000)]
169169
public async Task Menu_bar_visibility_and_auto_hide()
170170
{
171171
var win = this.fx.MainWindow;
@@ -175,7 +175,7 @@ public async Task Menu_bar_visibility_and_auto_hide()
175175
(await win.IsMenuBarVisibleAsync()).Should().BeTrue();
176176
}
177177

178-
[Fact(Timeout = 5000)]
178+
[Fact(Timeout = 20000)]
179179
public async Task Parent_child_relationship_roundtrip()
180180
{
181181
var child = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false, Width = 300, Height = 200 });
@@ -188,7 +188,7 @@ public async Task Parent_child_relationship_roundtrip()
188188
child.Destroy();
189189
}
190190

191-
[Fact(Timeout = 5000)]
191+
[Fact(Timeout = 20000)]
192192
public async Task Represented_filename_and_edited_flags()
193193
{
194194
var win = this.fx.MainWindow;

0 commit comments

Comments
 (0)