Fix e2e tests with new Connection#ip property

pull/648/head
pabloFuente 2021-08-10 19:27:17 +02:00
parent 8559ca96d4
commit 0b7c993551
5 changed files with 9 additions and 6 deletions

View File

@ -46,8 +46,8 @@ public class CDREventParticipant extends CDREventEnd {
// TODO: remove deprecated "participantId" when possible
json.addProperty("participantId", this.participant.getParticipantPublicId());
json.addProperty("connectionId", this.participant.getParticipantPublicId());
json.addProperty("location",
this.participant.getLocation() != null ? this.participant.getLocation().toString() : "unknown");
json.addProperty("location", this.participant.getLocation().toString());
json.addProperty("ip", this.participant.getLocation().getIp());
json.addProperty("platform", this.participant.getPlatform());
json.addProperty("clientData", this.participant.getClientMetadata());
json.addProperty("serverData", this.participant.getServerMetadata());

View File

@ -70,8 +70,8 @@ public class FinalUser {
public JsonObject toJson() {
JsonObject json = new JsonObject();
json.addProperty("id", id);
json.addProperty("ip", this.location.getIp());
json.addProperty("location", this.location.toString());
json.addProperty("ip", this.location.getIp());
json.addProperty("platform", platform);
JsonObject connectionsJson = new JsonObject();

View File

@ -314,7 +314,8 @@ public class Participant {
json.addProperty("sessionId", this.sessionId);
json.addProperty("createdAt", this.token.getCreatedAt());
json.addProperty("activeAt", this.activeAt);
json.addProperty("location", this.location != null ? this.location.toString() : "unknown");
json.addProperty("location", his.location.toString());
json.addProperty("ip", this.location.getIp());
json.addProperty("platform", this.platform);
if (this.token.getToken() != null) {
json.addProperty("token", this.token.getToken());

View File

@ -152,6 +152,7 @@ public class Token {
json.addProperty("token", this.getToken());
json.add("activeAt", null);
json.add("location", null);
json.add("ip", null);
json.add("platform", null);
json.add("clientData", null);
json.add("publishers", null);

View File

@ -3061,9 +3061,9 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestAppE2eTest {
false, true,
"{'id':'STR','object':'STR','sessionId':'STR','createdAt':0,'mediaMode':'STR','recordingMode':'STR','defaultRecordingProperties':{'hasVideo':true,'frameRate':25,"
+ "'hasAudio':true,'shmSize':536870912,'name':'','outputMode':'COMPOSED','resolution':'1280x720','recordingLayout':'BEST_FIT'},'customSessionId':'STR','connections':{'numberOfElements':2,'content'"
+ ":[{'connectionId':'STR','createdAt':0,'location':'STR','platform':'STR','token':'STR','role':'STR','serverData':'STR','clientData':'STR','publishers':["
+ ":[{'connectionId':'STR','createdAt':0,'location':'STR','ip':'STR','platform':'STR','token':'STR','role':'STR','serverData':'STR','clientData':'STR','publishers':["
+ "{'createdAt':0,'streamId':'STR','mediaOptions':{'hasAudio':false,'audioActive':false,'hasVideo':false,'videoActive':false,'typeOfVideo':'STR','frameRate':0,"
+ "'videoDimensions':'STR','filter':{}}}],'subscribers':[{'createdAt':0,'streamId':'STR','publisher':'STR'}]},{'connectionId':'STR','createdAt':0,'location':'STR',"
+ "'videoDimensions':'STR','filter':{}}}],'subscribers':[{'createdAt':0,'streamId':'STR','publisher':'STR'}]},{'connectionId':'STR','createdAt':0,'location':'STR','ip':'STR',"
+ "'platform':'STR','token':'STR','role':'STR','serverData':'STR','clientData':'STR','publishers':[{'createdAt':0,'streamId':'STR','mediaOptions':{'hasAudio':false,"
+ "'audioActive':false,'hasVideo':false,'videoActive':false,'typeOfVideo':'STR','frameRate':0,'videoDimensions':'STR','filter':{}}}],'subscribers':[{'createdAt':0,'streamId':'STR','publisher':'STR'}]}]},"
+ "'recording':false,'forcedVideoCodec':'STR','allowTranscoding':false}");
@ -3949,6 +3949,7 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestAppE2eTest {
connectionJson.get("createdAt").getAsLong() > timestamp);
Assert.assertTrue("Wrong activeAt Connection property", connectionJson.get("activeAt").isJsonNull());
Assert.assertTrue("Wrong location Connection property", connectionJson.get("location").isJsonNull());
Assert.assertTrue("Wrong ip Connection property", connectionJson.get("ip").isJsonNull());
Assert.assertTrue("Wrong platform Connection property", connectionJson.get("platform").isJsonNull());
Assert.assertTrue("Wrong clientData Connection property", connectionJson.get("clientData").isJsonNull());
Assert.assertTrue("Wrong publishers Connection property",