Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 2519 #2530

Closed
wants to merge 194 commits into from
Closed

Issue 2519 #2530

wants to merge 194 commits into from

Conversation

xhoaluu
Copy link
Contributor

@xhoaluu xhoaluu commented Sep 29, 2017

PR for #2519

ghjansen and others added 30 commits January 18, 2017 18:17
# Conflicts:
#	restcomm/restcomm.http/src/main/java/org/restcomm/connect/http/RecordingsEndpoint.java
…Environment

# Conflicts:
#	restcomm/restcomm.application/src/main/webapp/WEB-INF/data/hsql/restcomm.script
#	restcomm/restcomm.application/src/main/webapp/WEB-INF/scripts/mariadb/init.sql
# Conflicts:
#	restcomm/restcomm.application/src/main/webapp/WEB-INF/data/hsql/restcomm.script
#	restcomm/restcomm.application/src/main/webapp/WEB-INF/scripts/mariadb/init.sql
#	restcomm/restcomm.dao/src/main/java/org/restcomm/connect/dao/mybatis/MybatisRecordingsDao.java
#	restcomm/restcomm.interpreter/src/main/java/org/restcomm/connect/interpreter/BaseVoiceInterpreter.java
Fernando Mendioroz and others added 17 commits October 23, 2017 12:47
…ns, tested s3 upload with this version and its working like a charm
…_error

Critical fix for making Geolocation API work with RC running on MySQL
build.xml will fetch RVD from github/releases instead of mobicents

Refers #2598
…ation

Addition of http-client configuration params for HTTP conn pooling
Remove port for Provider DID URI when SRV enabled.
added regreg in place of exact https port value
@@ -103,13 +104,18 @@ private Address contact(final Gateway gateway, final int expires) throws Servlet
if (outboundInterface == null)
outboundInterface = (SipURI) factory.createSipURI(null, address);
final String user = gateway.getUserName();
String contactUser = new String (user);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this "new String" is not strictly neccesary...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, to be updated.

private static SipStackTool tool;
private SipStack receiver;
private SipPhone phone;
final String deploymentUrl = "http://127.0.0.1:8080/restcomm/";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe is a good time to refactor thsi test to support parallelization, see other test to check how it goes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to parallel test

final String userName = "august@127.0.0.1:5092";
isAuthorizationHasRightUserName = false;
isRegisterRequestReceived = false;
ExecutorService executorService = Executors.newSingleThreadExecutor();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to do this async to the test thread, why dont ew simple set the Gateway,and then proceed with traffic assertions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may need to declare those asserting flags as volatile if several threads are read/writing them..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the time, copied pasted without evaluating.
I removed the parallel code and also removed the check variables, put direct assert at the point as we don't use thread any more.

}
});

RestcommCallsTool.getInstance().setGateWay(deploymentUrl, adminAccountSid, adminAuthToken, "friendlyName",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we asssert something on response, to ensure the response is as expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As response is from simulator, then nothing to check there.
I changed the testcase name, then it's cleared about the target for the testcase.
I just need to check if username has host part, REGISTER can be sent out and the username in authentication header in REGISTER request is what we want.


String response = null;
try {
response = webResource.accept(MediaType.APPLICATION_XML).post(String.class, params);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we using XML here, most of the testsuite is using JSON as response format to ease parsing later...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated follow comment.

final String host = outboundInterface.getHost();
int port = outboundInterface.getPort();
if (port == -1) {
port = outboundInterface().getPort();
}
final StringBuilder buffer = new StringBuilder();
buffer.append("sip:").append(user).append("@").append(host).append(":").append(port);
buffer.append("sip:").append(contactUser).append("@").append(host).append(":").append(port);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be great to create meaningful constants fro "@" and ":" is all over the place...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot of place where is using @ and : .
We need to create a common place to define all of these thing. It's would be great in another story for refactoring code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

@xhoaluu xhoaluu closed this Nov 6, 2017
@jaimecasero jaimecasero deleted the issue-2519 branch April 11, 2018 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants