Skip to content

Commit

Permalink
Replace ENSA2 sleep 300 with cs_wait_for_idle
Browse files Browse the repository at this point in the history
Replace ENSA2 12sp5 sleep 300 with cs_wait_for_idle
TEAM-9458 - [timeboxed]Research is sleep 300 can be replaced with cs_wait_for_idle
  • Loading branch information
lilyeyes committed Jun 25, 2024
1 parent 56e355f commit 6250ff6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/sles4sap/ensa/netweaver_ensa2_web_methods.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use hacluster;
use lockapi;
use serial_terminal qw(select_serial_terminal);
use version_utils 'is_sle';
use utils 'zypper_call';

sub webmethod_checks {
my ($self, $instance_id) = @_;
Expand Down Expand Up @@ -68,12 +69,17 @@ sub run {
barrier_wait('ENSA_FAILOVER_DONE'); # sync nodes

$self->webmethod_checks($instance_id);
# Use cs_wait_for_idle to wait until the cluster is idle before continuing the tests
if (is_sle('=12-SP5')) {
zypper_call('in ClusterTools2') if get_var('HA_CLUSTER');
wait_for_idle_cluster(timeout => 300);
}
# Execute failover from ASCS instance - this will return resources to original host
if ($instance_type eq 'ASCS') {
# Some delay needed here for 12-SP5, don't know why even webmethod_checks passed
# Use cs_wait_for_idle to wait until the cluster is idle before continuing the tests
if (is_sle('=12-SP5')) {
sleep 300;
record_info "sleep 300s for 12-SP5";
zypper_call('in ClusterTools2') if get_var('HA_CLUSTER');
wait_for_idle_cluster(timeout => 300);
}
record_info('Failover', "Executing 'HAFailoverToNode'. Failover from $physical_hostname to remote site");
$self->sapcontrol(webmethod => 'HAFailoverToNode', instance_id => $instance_id, additional_args => "\"\"");
Expand Down

0 comments on commit 6250ff6

Please sign in to comment.