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: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
57f3d503c4
commit
efe7c309cd
|
@ -69,7 +69,7 @@ DWORD map_ldap_error(DWORD err)
|
|||
case LDAP_NO_OBJECT_CLASS_MODS: return ERROR_DS_CANT_MOD_OBJ_CLASS;
|
||||
case LDAP_RESULTS_TOO_LARGE: return ERROR_DS_OBJECT_RESULTS_TOO_LARGE;
|
||||
case LDAP_AFFECTS_MULTIPLE_DSAS: return ERROR_DS_AFFECTS_MULTIPLE_DSAS;
|
||||
case LDAP_SERVER_DOWN: return ERROR_DS_SERVER_DOWN;
|
||||
case LDAP_SERVER_DOWN: return ERROR_DS_SERVER_DOWN;
|
||||
case LDAP_LOCAL_ERROR: return ERROR_DS_LOCAL_ERROR;
|
||||
case LDAP_ENCODING_ERROR: return ERROR_DS_ENCODING_ERROR;
|
||||
case LDAP_DECODING_ERROR: return ERROR_DS_DECODING_ERROR;
|
||||
|
|
|
@ -106,11 +106,23 @@ static void test_LDAP(void)
|
|||
IDispatch_Release(disp);
|
||||
|
||||
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);
|
||||
if (hr == S_OK)
|
||||
IADs_Release(ads);
|
||||
|
||||
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);
|
||||
if (hr == S_OK)
|
||||
IDispatch_Release(disp);
|
||||
|
@ -337,8 +349,12 @@ todo_wine
|
|||
ok(hr == E_NOINTERFACE, "got %#x\n", hr);
|
||||
|
||||
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);
|
||||
if (hr != S_OK) return;
|
||||
|
||||
pref.dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE;
|
||||
pref.vValue.dwType = ADSTYPE_INTEGER;
|
||||
|
|
Loading…
Reference in New Issue