diff options
Diffstat (limited to 'src/libs/dutil/test/DUtilUnitTest/LocControlsUtilTests.cpp')
-rw-r--r-- | src/libs/dutil/test/DUtilUnitTest/LocControlsUtilTests.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libs/dutil/test/DUtilUnitTest/LocControlsUtilTests.cpp b/src/libs/dutil/test/DUtilUnitTest/LocControlsUtilTests.cpp index a558c0c5..fd8679cb 100644 --- a/src/libs/dutil/test/DUtilUnitTest/LocControlsUtilTests.cpp +++ b/src/libs/dutil/test/DUtilUnitTest/LocControlsUtilTests.cpp | |||
@@ -15,6 +15,7 @@ namespace DutilTests | |||
15 | void CanLoadControlsWxl() | 15 | void CanLoadControlsWxl() |
16 | { | 16 | { |
17 | HRESULT hr = S_OK; | 17 | HRESULT hr = S_OK; |
18 | DWORD dwRetry = 0; | ||
18 | WIX_LOCALIZATION* pLoc = NULL; | 19 | WIX_LOCALIZATION* pLoc = NULL; |
19 | LOC_CONTROL* pLocControl = NULL; | 20 | LOC_CONTROL* pLocControl = NULL; |
20 | 21 | ||
@@ -26,7 +27,15 @@ namespace DutilTests | |||
26 | NativeAssert::Succeeded(hr, "Failed to initialize Xml."); | 27 | NativeAssert::Succeeded(hr, "Failed to initialize Xml."); |
27 | 28 | ||
28 | pin_ptr<const wchar_t> wxlFilePath = PtrToStringChars(TestData::Get("TestData", "LocUtilTests", "controls.wxl")); | 29 | pin_ptr<const wchar_t> wxlFilePath = PtrToStringChars(TestData::Get("TestData", "LocUtilTests", "controls.wxl")); |
29 | hr = LocLoadFromFile(wxlFilePath, &pLoc); | 30 | do |
31 | { | ||
32 | if (FAILED(hr)) | ||
33 | { | ||
34 | ::Sleep(500); | ||
35 | } | ||
36 | |||
37 | hr = LocLoadFromFile(wxlFilePath, &pLoc); | ||
38 | } while (FAILED(hr) && ++dwRetry < 5); | ||
30 | NativeAssert::Succeeded(hr, "Failed to parse controls.wxl: {0}", wxlFilePath); | 39 | NativeAssert::Succeeded(hr, "Failed to parse controls.wxl: {0}", wxlFilePath); |
31 | 40 | ||
32 | Assert::Equal(3ul, pLoc->cLocControls); | 41 | Assert::Equal(3ul, pLoc->cLocControls); |