From: John Spray Date: Wed, 1 Feb 2017 00:38:08 +0000 (+0000) Subject: tasks/cephfs: switch open vs. write in test_open_inode X-Git-Tag: v11.2.1~138^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2d5d8f27679d40ff962c8329026b2d75a3fa7c78;p=ceph.git tasks/cephfs: switch open vs. write in test_open_inode Do the write after opening the file, so that we get good behaviour wrt the change in Mount.open_background that uses file existence to confirm that the open happened. Signed-off-by: John Spray (cherry picked from commit a027dba78fc8bc84ae39d7998b386ce21c01e1bf) --- diff --git a/qa/tasks/cephfs/test_strays.py b/qa/tasks/cephfs/test_strays.py index 467932b6e4fdc..682917cc579de 100644 --- a/qa/tasks/cephfs/test_strays.py +++ b/qa/tasks/cephfs/test_strays.py @@ -236,11 +236,11 @@ class TestStrays(CephFSTestCase): # Write some bytes to a file size_mb = 8 - self.mount_a.write_n_mb("open_file", size_mb) - open_file_ino = self.mount_a.path_to_ino("open_file") # Hold the file open p = self.mount_a.open_background("open_file") + self.mount_a.write_n_mb("open_file", size_mb) + open_file_ino = self.mount_a.path_to_ino("open_file") self.assertEqual(self.get_session(mount_a_client_id)['num_caps'], 2)