tests: reduce sleep interval in ikev2 sa rekey test 54/41954/8
authorIvan Ivanets <[email protected]>
Mon, 2 Dec 2024 21:10:10 +0000 (21:10 +0000)
committerBenoit Ganne <[email protected]>
Wed, 8 Jan 2025 08:11:49 +0000 (08:11 +0000)
commit379a454aa71facbffd3d4c45537809401e43fcd8
treed8dd22d396d7f43400e1931a7b764e63bc5f9bb4
parent6102d81832ed93469de64222657a69dcd4e0af5e
tests: reduce sleep interval in ikev2 sa rekey test

Type: test

The sleep interval for this test is set to 0.1 seconds instead of
the default 2 seconds. This change is necessary because the test
verifies the expiration of old IPsec SAs
(self.fail("old IPsec SA not expired")) within a strict timeframe.
A longer sleep interval, such as 2 seconds, would significantly
delay the loop iterations, reducing the granularity of checks for
SA expiration and increasing the risk of false failures.

By setting the sleep interval to 0.1 seconds:
- The test can perform frequent checks for the status of IPsec SAs
- It reduces the likelihood of the test prematurely failing

Change-Id: I92ac3de0f33838620b51083d240043e62f37c490
Signed-off-by: Ivan Ivanets <[email protected]>
src/plugins/ikev2/ikev2.api
src/plugins/ikev2/ikev2.c
src/plugins/ikev2/ikev2.h
src/plugins/ikev2/ikev2_api.c
src/plugins/ikev2/ikev2_cli.c
src/plugins/ikev2/ikev2_priv.h
src/plugins/ikev2/ikev2_test.c
test/test_ikev2.py