Commit efe7c309 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

adsldp/tests: Handle more cases of ERROR_DS_SERVER_DOWN.

Probably server protects itself from quick successive connections from the same client and returns LDAP_SERVER_DOWN. Signed-off-by: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 57f3d503
...@@ -106,11 +106,23 @@ static void test_LDAP(void) ...@@ -106,11 +106,23 @@ static void test_LDAP(void)
IDispatch_Release(disp); IDispatch_Release(disp);
hr = ADsOpenObject(path, user, password, test[i].flags, &IID_IADs, (void **)&ads); hr = ADsOpenObject(path, user, password, test[i].flags, &IID_IADs, (void **)&ads);
if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN))
{
SysFreeString(path);
skip("server is down\n");
break;
}
ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#x, expected %#x\n", i, hr, test[i].hr); ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#x, expected %#x\n", i, hr, test[i].hr);
if (hr == S_OK) if (hr == S_OK)
IADs_Release(ads); IADs_Release(ads);
hr = ADsGetObject(path, &IID_IDispatch, (void **)&disp); hr = ADsGetObject(path, &IID_IDispatch, (void **)&disp);
if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN))
{
SysFreeString(path);
skip("server is down\n");
break;
}
ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#x, expected %#x\n", i, hr, test[i].hr); ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#x, expected %#x\n", i, hr, test[i].hr);
if (hr == S_OK) if (hr == S_OK)
IDispatch_Release(disp); IDispatch_Release(disp);
...@@ -337,8 +349,12 @@ todo_wine ...@@ -337,8 +349,12 @@ todo_wine
ok(hr == E_NOINTERFACE, "got %#x\n", hr); ok(hr == E_NOINTERFACE, "got %#x\n", hr);
hr = ADsGetObject(L"LDAP://ldap.forumsys.com", &IID_IDirectorySearch, (void **)&ds); hr = ADsGetObject(L"LDAP://ldap.forumsys.com", &IID_IDirectorySearch, (void **)&ds);
if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN))
{
skip("server is down\n");
return;
}
ok(hr == S_OK, "got %#x\n", hr); ok(hr == S_OK, "got %#x\n", hr);
if (hr != S_OK) return;
pref.dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE; pref.dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE;
pref.vValue.dwType = ADSTYPE_INTEGER; pref.vValue.dwType = ADSTYPE_INTEGER;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment