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

test duplicate username (fixed) #3

Closed
saadben opened this issue Apr 15, 2014 · 5 comments
Closed

test duplicate username (fixed) #3

saadben opened this issue Apr 15, 2014 · 5 comments

Comments

@saadben
Copy link

saadben commented Apr 15, 2014

In the login response, we should have used "pack.userId = self.currentId" instead of pack.userId=0

@yuancheng-p
Copy link
Owner

I think if the user fail to login, he won't be allocated a userId, so we should keep it 0.

@saadben
Copy link
Author

saadben commented Apr 16, 2014

Yes, the way we implemented it is corret too. But if we want the test to pass, we'll need to allocate a new user Id (setting userId to -1 or -2 according to the error was too clever for their tests :D )

----- Mail original -----
De: "Yuancheng Peng" notifications@github.com
À: "yuancheng2013/c2w" c2w@noreply.github.com
Cc: "saadben" saad.bennanizoubir@telecom-bretagne.eu
Envoyé: Mercredi 16 Avril 2014 11:52:35
Objet: Re: [c2w] test duplicate username (fixed) (#3)

I think if the user fail to login, he won't be allocated a userId, so we should keep it 0.


Reply to this email directly or view it on GitHub .

@yuancheng-p
Copy link
Owner

I think you are talking about the test "trial_retransmit_one_user_login_udp_server_test.py".
I tried to fix this bug and I belive it's an error made by the professor. When a user want to login with a user name exist in the system, the server should send an error packet with error code!

@saadben
Copy link
Author

saadben commented Apr 19, 2014

For the "trial_retransmit_one_user_login_udp_server_test.py", I don't think it's an error in their test. Actually, a client sends a login request but the ack is lost, so he resends a request. The problem in the code is that we don't resend the same ACK again (as we're supposed to do) but we consider the second request as a duplicate login request...

@yuancheng-p
Copy link
Owner

fix with commit 2d85ccc

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

No branches or pull requests

2 participants