[sip-comm-dev] Re : [sip-comm-dev] OperationSetMultiUserChat and ChatRoom tests


#1

a) testCreateChatRoom, b) testJoinRoom, c)
testGetJoinedChatRoom,
d) testFindRoom, e) testInviteReject, f) testInviteJoin,
f) testLeave, g) testNickName, h) testRoomSubject,
i) testConferenceChat, j) testMemberBan, k) testMemberKick

The work is not done since while all tests pass on my
working machine
I noticed it wasn't the case for the last two ones (
j) and k) )

When a member is kicked or banned from a chatroom,
all remaining participants in the chatroom are informed
by the corresponding event but not the kicked or banned
user.
He will be aware of it only if checks his joined status
or try to do something which requires to be in the room.

However, someRoom.isJoined() method could return true for a banned
or kicked user if called immediatly after he is chased away.
I introduced a small wait before the check on someRoom.isJoined()
to have the user status properly updated and it seems to work.

Sympho

···

on cruisecontrol.
So there is still work to do. That said, if any one has
time to
look at it, I will appreciate any suggestion for
enhancements and/or
new tests.

Regards
Sympho

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hey Sympho,

Looks very nice. It's been a while since we extended our unit tests so
this is really highly appreciated.

A few quick questions:

1. What's the reason of having both TestOperationSetMultiUserChat and
TestOperationSetMultiUserChat2. If they serve different purposes then
their names and class comments should probably indicate so. If either of
them is unnecessary, we should then get rid of it.

--more inline.

sympho wrote:

a) testCreateChatRoom, b) testJoinRoom, c)
testGetJoinedChatRoom,
d) testFindRoom, e) testInviteReject, f) testInviteJoin,
f) testLeave, g) testNickName, h) testRoomSubject,
i) testConferenceChat, j) testMemberBan, k) testMemberKick

The work is not done since while all tests pass on my
working machine
I noticed it wasn't the case for the last two ones (
j) and k) )

When a member is kicked or banned from a chatroom,
all remaining participants in the chatroom are informed
by the corresponding event but not the kicked or banned
user.

We should definitely change this. If this is a problem with smack we
should then try to fix it, or (if that would take too much effort)
implement some kind of polling. Either way, we can't only rely on a call
to isJoined() to detect whether we are banned from a chat room.

So, once we have an event notifying us of this we are simply going to
implement the tests in a way that would make them wait() for this event
before assert()ing that isJoined()==false. This is what we do in the
case of messages and presence statuses for example.

Does this make sense?

Cheers
Emil

···

He will be aware of it only if checks his joined status
or try to do something which requires to be in the room.

However, someRoom.isJoined() method could return true for a banned
or kicked user if called immediatly after he is chased away.
I introduced a small wait before the check on someRoom.isJoined()
to have the user status properly updated and it seems to work.

Sympho

on cruisecontrol.
So there is still work to do. That said, if any one has
time to
look at it, I will appreciate any suggestion for
enhancements and/or
new tests.

Regards
Sympho

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net