$Id: ManualTests.txt,v 1.9.2.2 2007/03/09 09:14:14 belaban Exp $


Group Membership Service (GMS) Protocol
=======================================


Hopefully these tests can be automated some time in the
future. Currently it takes too much time to write automatic tests. The
tests should be executed before releasing a new version of JGroups.

- All the tests use the JGroups/Demos/Draw program
- All tests should be run with both FD and FD_SOCK
- All test should be run with FLUSH (flush-udp.xml) and without FLUSH (udp.xml)
- When FLUSH is used tests should be run with both Channel.BLOCK turned off and on


When *FD only* is used make sure that timeout and max_tries are relatively low. For example,
timeout="2000" and max_tries="3" are good reference values. These settings are important 
for tests 9,10 and 12.

'Leave' means exit the demo program gracefully, ie. through
"Leave&Exit".
'Kill' means just kill the process id



Test 1
------

- Start A, B
- Leave B
  --> B should leave and window should disappear
  --> A should show 1 member


Test 2
------

- Test 1
- Repeatedly start B and then leave B
  --> A should always show the correct mbrship


Test 3
------

- Start A, B
- Kill B
  --> B should be suspected
  --> A should show 1 member
(run with FD_SOCK first, then with FD only)


Test 4
------

- Test 3
- Repeatedly start B and kill B
  --> A should always show the correct mbrship
With FD, there will be warnings like 
"failed to collect all ACKs (3) for view [192.168.5.2:4275|9]"; these
are normal (expected) warning



Test 5
------

- Start A, B
- Leave A
  --> A should leave and window should disappear
  --> B should be new coordinator
  --> B should show 1 member


Test 5.1
--------
(requires FD_SOCK)
- Start A, B, C
- Leave A
- Leave B
- Leave C
- Everyone should be able to leave gracefully, no error messages such as
  "FD_SOCK.up(): I was suspected by 192.168.5.2:1466; ignoring the SUSPECT message"


Test 6
------

- Start A, B
- Kill A
  --> A should be suspected
  --> B should become new coordinator
  --> B should show 1 member


Test 7
------

- Start A, B, C, D
- Kill B and C
  --> A and D should show 2 members


Test 8
------

- Start A, B, C, D
- Kill A, B, C simultaneously
  --> D should become new coordinator
  --> D should show 1 member


Test 9
------

- (use with FD only)
- Start A, B
- Kill B and immediately restart B
  --> Both A and B should show 2 members


Test 10
-------

- (use with FD only)
- Start A and B
- Kill A (coordinator) and immediately restart A
  --> B should become new coordinator
  --> Both A and B should show 2 members
  --> The new A may try to join the old one (if still around). This
      could result in a join() timeout until the new coordinator has
      been determined



Test 11
-------

- Start A
- Leave A
  --> A should leave in a short time (no hangs)



Test 12
-------

- (only use with FD)
- Start A, B, C
- Kill A and simultaneously leave C
- C should block until B becomes coordinator (and shows mbrship=2)
- C then leaves B and shows mbrship=1


Test 13
-------
- Start A and B concurrently
- They should form a group of 2


Test 14
-------

- Start 20 instances
- Mbrship should be 20
- Kill and leave members randomly
- Last member should show mbrship=1
[ test with both FD and FD_SOCK ]


Test 15
-------

- Start A, B
- Shun A (CTRL-Z and then fg)
- When B has rejoined the group, kill A
- The view needs to be {B} now



Pull-the-plug scenarios
=======================

- Run Draw with udp.xml, tcp.xml and tcp-nio.xml, those configurations may need to be adjusted to use
  the IP addresses of the 2 nodes
- Make sure loopback=true in UDP/TCP/TCP_NIO if running on Windows
- Reduce the min and max intervals in MERGE2, otherwise we have to
  wait too long
- 2 nodes, node 1 and node 2, connected to a switch


Test 16
-------

- Pull the plug on node 2
- Node 1 and node 2 should each show 1 member
- Put the plug back in
- Nodes 1 and 2 should merge into a group of 2

Test 17
-------

- Pull the plug on node 1 and node 2
- Node 1 and node 2 should each show 1 member
- Put the plugs back in
- Nodes 1 and 2 should merge into a group of 2


Test 18
-------

- Pull the plug of nodes 1 and 2 *on the switch side*
- Node 1 and node 2 should each show 1 member
- Put the plugs back in
- Nodes 1 and 2 should merge into a group of 2


Test 19
-------

- Kill the switch (pull the power)
- Node 1 and node 2 should each show 1 member
- Power the switch back up
- Nodes 1 and 2 should merge into a group of 2

Test 20
-------
- Kill the switch (or pull the plugs on all nodes)
- Power up the switch (or reinsert the plugs)
- After the merge:
  - Leave the new coordinator
  - The leave should immediately install a new view
    (bug: http://jira.jboss.com/jira/browse/JGRP-350)


Test 21
-------
- Run tests 16-20 with 3 nodes

Test 22
-------
- Run Test 16 with DrawMultiplexer with "tcp" stack


