Skip to content

Commit 1d047a6

Browse files
committed
give tests more window-finding time for appveyor
1 parent 73e3880 commit 1d047a6

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

UnitTests/HashProp.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
using Xunit;
1010
using TestStack.White;
11+
using TestStack.White.Configuration;
1112
using TestStack.White.UIItems;
1213
using TestStack.White.UIItems.WindowItems;
1314
using TestStack.White.UIItems.Finders;
@@ -56,12 +57,13 @@ Window OpenHashPropWindow(string filename)
5657
sei.nShow = 1; // SW_SHOWNORMAL
5758
ShellExecuteExW(ref sei);
5859

59-
TestStack.White.Configuration.CoreAppXmlConfiguration.Instance.FindWindowTimeout = 1500; // 1.5 sec.
60-
6160
// Find the file properties sheet window
6261
Window prop_window = null;
6362

6463
// Prior to Windows 10, the file properties sheet opens in the curent process
64+
int orig_timeout = CoreAppXmlConfiguration.Instance.FindWindowTimeout;
65+
if ((int)Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentMajorVersionNumber", 0) >= 10)
66+
CoreAppXmlConfiguration.Instance.FindWindowTimeout = 1500; // likely to fail on Windows 10+, so use a short timeout (1.5s) in that case
6567
if (! is_com_surrogate)
6668
{
6769
Application app = Application.Attach(Process.GetCurrentProcess());
@@ -89,6 +91,7 @@ Window OpenHashPropWindow(string filename)
8991
Assert.NotNull(prop_window);
9092
is_com_surrogate = true;
9193
}
94+
CoreAppXmlConfiguration.Instance.FindWindowTimeout = orig_timeout;
9295

9396
return prop_window;
9497
}

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2.4.0.48-beta
1+
version: 2.4.0.51-beta
22

33
image: Visual Studio 2015
44

installer/HashCheck.nsi

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Unicode true
77

88
Name "HashCheck"
9-
OutFile "HashCheckSetup-v2.4.0.48-beta.exe"
9+
OutFile "HashCheckSetup-v2.4.0.51-beta.exe"
1010

1111
RequestExecutionLevel admin
1212
ManifestSupportedOS all
@@ -53,13 +53,13 @@ FunctionEnd
5353
!insertmacro MUI_LANGUAGE "Ukrainian"
5454
!insertmacro MUI_LANGUAGE "Catalan"
5555

56-
VIProductVersion "2.4.0.48-beta"
56+
VIProductVersion "2.4.0.51-beta"
5757
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "HashCheck Shell Extension"
58-
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "2.4.0.48-beta"
58+
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "2.4.0.51-beta"
5959
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "Installer distributed from https://github.com/gurnec/HashCheck/releases"
6060
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright © 2008-2016 Kai Liu, Christopher Gurnee, Tim Schlueter, et al. All rights reserved."
6161
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Installer (x86/x64) from https://github.com/gurnec/HashCheck/releases"
62-
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "2.4.0.48-beta"
62+
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "2.4.0.51-beta"
6363

6464
; With solid compression, files that are required before the
6565
; actual installation should be stored first in the data block,

version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
#define HASHCHECK_NAME_STR "HashCheck Shell Extension"
1313

1414
// Full version: MUST be in the form of major,minor,revision,build
15-
#define HASHCHECK_VERSION_FULL 2,4,0,48
15+
#define HASHCHECK_VERSION_FULL 2,4,0,51
1616

1717
// String version: May be any suitable string
18-
#define HASHCHECK_VERSION_STR "2.4.0.48-beta"
18+
#define HASHCHECK_VERSION_STR "2.4.0.51-beta"
1919

2020
#ifdef _USRDLL
2121
// PE version: MUST be in the form of major.minor

0 commit comments

Comments
 (0)