Skip to content

Commit

Permalink
Delete drawboard function from WebSocketsTest
Browse files Browse the repository at this point in the history
Due to poo#114532, in the sake of stability, that we can safely
delete the function that tests the drawboard example.
We already cover the rest of Tomcat's WebSocket examples,
and, in reality, this drawboard example is not really tested
with multiple connections as it would ideally be the case.

At the same time, increase the timeout valule for some tomcat
test modules to reduce the impact by performance.
  • Loading branch information
rfan1 committed Jul 25, 2022
1 parent ccf9d6b commit 83a6bcb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/Tomcat/JspTest.pm
Expand Up @@ -16,7 +16,7 @@ use Tomcat::Utils;
use version_utils 'is_sle';

# allow a 60 second timeout for asserting needles
use constant TIMEOUT => 60;
use constant TIMEOUT => 90;

# test all JSP examples
sub test_all_examples() {
Expand Down
2 changes: 1 addition & 1 deletion lib/Tomcat/Utils.pm
Expand Up @@ -17,7 +17,7 @@ use version_utils 'is_sle';
use registration;

# allow a 60 second timeout for asserting needles
use constant TIMEOUT => 60;
use constant TIMEOUT => 90;

# Use keyboard to browse the examples faster
sub browse_with_keyboard {
Expand Down
15 changes: 2 additions & 13 deletions lib/Tomcat/WebSocketsTest.pm
Expand Up @@ -15,14 +15,14 @@ use utils;
use Tomcat::Utils;

# allow a 60 second timeout for asserting needles
use constant TIMEOUT => 60;
use constant TIMEOUT => 90;

# test all WebSocket examples
sub test_all_examples() {
my ($self) = shift;

# array with example test function and number of tabs required to select the example
my @websocket_examples = ([\&echo, 1], [\&chat, 1], [\&snake, 1], [\&drawboard, 1]);
my @websocket_examples = ([\&echo, 1], [\&chat, 1], [\&snake, 1]);

# access the tomcat websocket examples page
$self->firefox_open_url('localhost:8080/examples/websocket');
Expand Down Expand Up @@ -61,15 +61,4 @@ sub snake() {
assert_screen('tomcat-snake-example', TIMEOUT);
}

# test multiplayer drawboard example
sub drawboard() {
assert_screen('tomcat-multiplayer-drawboard-example', TIMEOUT);
assert_and_click('tomcat-multiplayer-drawboard-example-focus');
send_key('pgdn');
assert_and_click('tomcat-multiplayer-drawboard-example-thickness');
send_key('pgup');
assert_and_click('tomcat-multiplayer-drawboard-example-draw');
assert_screen('tomcat-multiplayer-drawboard-example-result', TIMEOUT);
}

1;

0 comments on commit 83a6bcb

Please sign in to comment.