diff mbox series

[1/2] st_courtesy.py: Fix problem of missing RECLAIM_COMPLETE in COUR2

Message ID 20211005234123.41053-2-dai.ngo@oracle.com (mailing list archive)
State New, archived
Headers show
Series st_courtesy.py: fix bug in COUR2 and add more tests for Courteous Server | expand

Commit Message

Dai Ngo Oct. 5, 2021, 11:41 p.m. UTC
Replace new_client and create_session with new_client_session.

Fixes: 18553b92ba8d0 ("pynfs: courtesy: add a test to ensure server releases state appropriately")
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
---
 nfs4.1/server41tests/st_courtesy.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/nfs4.1/server41tests/st_courtesy.py b/nfs4.1/server41tests/st_courtesy.py
index dd911a37772d..a38ba30b6133 100644
--- a/nfs4.1/server41tests/st_courtesy.py
+++ b/nfs4.1/server41tests/st_courtesy.py
@@ -69,10 +69,9 @@  def testLockSleepLock(t, env):
     check(res, NFS4_OK)
 
     lease_time = _getleasetime(sess1)
-    env.sleep(lease_time * 2, "twice the lease period")
+    env.sleep(lease_time + 10, "the lease period + 10 secs")
 
-    c2 = env.c1.new_client(b"%s_2" % env.testname(t))
-    sess2 = c2.create_session()
+    sess2 = env.c1.new_client_session(b"%s_2" % env.testname(t))
 
     res = open_file(sess2, env.testname(t), access=OPEN4_SHARE_ACCESS_WRITE)
     check(res)