openvidu-test-browsers: fix CustomHttpClient response check

pull/550/head
pabloFuente 2020-10-07 12:12:55 +02:00
parent 63a6261d88
commit b479cb2bac
1 changed files with 3 additions and 3 deletions

View File

@ -138,14 +138,14 @@ public class CustomHttpClient {
JsonObject jsonObjActual = json.get(entry.getKey()).getAsJsonObject();
// COMPARE
} catch (JsonSyntaxException e1) {
} catch (Exception e1) {
try {
JsonArray jsonArrayExpected = JsonParser.parseString((String) value).getAsJsonArray();
JsonArray jsonArrayActual = json.get(entry.getKey()).getAsJsonArray();
// COMPARE
} catch (JsonSyntaxException e2) {
if (((String) value) != json.get(entry.getKey()).getAsString()) {
} catch (Exception e2) {
if (!((String) value).equals(json.get(entry.getKey()).getAsString())) {
throw new Exception("JSON field " + entry.getKey() + " has not expected value. Expected: "
+ value + ". Actual: " + json.get(entry.getKey()).getAsString());
}