diff --git a/tests/integ/dataset_test.py b/tests/integ/dataset_test.py index 645005c4..280877cf 100755 --- a/tests/integ/dataset_test.py +++ b/tests/integ/dataset_test.py @@ -546,7 +546,7 @@ def testCompound(self): self.assertTrue(helper.validateId(dset_uuid)) # link the new dataset - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1633,7 +1633,7 @@ def testAutoChunk1dDataset(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1686,7 +1686,7 @@ def testAutoChunk2dDataset(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1743,7 +1743,7 @@ def testMinChunkSizeDataset(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2138,7 +2138,7 @@ def testContiguousRefDataset(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2216,7 +2216,7 @@ def testContiguousRefZeroDimDataset(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2301,7 +2301,7 @@ def testChunkedRefDataset(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2385,7 +2385,7 @@ def testChunkedRefIndirectDataset(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2481,7 +2481,7 @@ def testChunkedRefIndirectS3UriDataset(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2542,7 +2542,7 @@ def testDatasetChunkPartitioning(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2605,7 +2605,7 @@ def testExtendibleDatasetChunkPartitioning(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) diff --git a/tests/integ/filter_test.py b/tests/integ/filter_test.py index 76c7c057..ea2df637 100755 --- a/tests/integ/filter_test.py +++ b/tests/integ/filter_test.py @@ -74,7 +74,7 @@ def testDeflateCompression(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -129,7 +129,7 @@ def testShuffleFilter(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -191,7 +191,7 @@ def testShuffleAndDeflate(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -246,7 +246,7 @@ def testBitShuffle(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -308,7 +308,7 @@ def testBitShuffleAndDeflate(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -493,7 +493,7 @@ def testBitDeshuffling(self): rspJson = json.loads(rsp.text) dset_uuid = rspJson["id"] self.assertTrue(helper.validateId(dset_uuid)) - req = self.endpoint + "/groups/" + root_uuid + "/links/" + "dset" + req = self.endpoint + "/groups/" + root_uuid + "/links/" + "dset" + helper.getRandomName() payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) self.assertEqual(rsp.status_code, 201, rsp.text) diff --git a/tests/integ/helper.py b/tests/integ/helper.py index 3eb63ecd..e8cfa9f0 100644 --- a/tests/integ/helper.py +++ b/tests/integ/helper.py @@ -81,6 +81,12 @@ def getTestDomainName(name): return domain +def getRandomName(): + """Return a random name""" + random_str = ''.join(random.choices(string.ascii_lowercase + string.digits, k=8)) + return random_str + + def getRequestHeaders(domain=None, username=None, bucket=None, password=None, **kwargs): """Get default request headers for domain""" if username is None: diff --git a/tests/integ/pointsel_test.py b/tests/integ/pointsel_test.py index 4c507f08..194eb2ce 100755 --- a/tests/integ/pointsel_test.py +++ b/tests/integ/pointsel_test.py @@ -93,7 +93,7 @@ def testPost1DDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset1d' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -287,7 +287,7 @@ def testPost1DDatasetBinary(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset1d' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -685,7 +685,7 @@ def testPostChunkedRefDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -836,7 +836,7 @@ def testPostChunkedRefIndirectDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -895,7 +895,7 @@ def testPut1DDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset1d' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1062,7 +1062,7 @@ def testPut1DDatasetBinary(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset1d' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1171,7 +1171,7 @@ def testPut1DDatasetVlenBinary(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset1d' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1729,7 +1729,7 @@ def testPostCompoundDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset_compound' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) diff --git a/tests/integ/query_test.py b/tests/integ/query_test.py index 437ae021..9025c78b 100644 --- a/tests/integ/query_test.py +++ b/tests/integ/query_test.py @@ -80,7 +80,7 @@ def testSimpleQuery(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset1' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -388,7 +388,7 @@ def testChunkedRefIndirectDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -459,7 +459,7 @@ def testPutQuery(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset1' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) diff --git a/tests/integ/value_test.py b/tests/integ/value_test.py index 22d5de03..66287caf 100755 --- a/tests/integ/value_test.py +++ b/tests/integ/value_test.py @@ -98,7 +98,7 @@ def testPut1DDataset(self): self.assertEqual(rsp.status_code, 201) # created # link new dataset as 'dset1d' - name = "dset1d" + name = "dset1d" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -197,7 +197,7 @@ def testPut1DDatasetBinary(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset1d' - name = "dset1d" + name = "dset1d" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -310,7 +310,7 @@ def testPut2DDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset1d' - name = "dset2d" + name = "dset2d" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -421,7 +421,7 @@ def testPut2DDatasetBinary(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset2d' - name = "dset2d" + name = "dset2d" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -526,7 +526,7 @@ def testPutSelection1DDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset1d' - name = "dset1d" + name = "dset1d" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -608,7 +608,7 @@ def testPutSelection2DDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset2d' - name = "dset2d" + name = "dset2d" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1070,7 +1070,7 @@ def testPutCompound(self): self.assertTrue(helper.validateId(dset1d_uuid)) # link new dataset as 'dset1' - name = "dset1d" + name = "dset1d" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset1d_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1164,7 +1164,7 @@ def testPutCompound(self): self.assertTrue(helper.validateId(dset2d_uuid)) # link new dataset as 'dset2d' - name = "dset2d" + name = "dset2d" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset2d_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1238,7 +1238,7 @@ def testSimpleTypeFillValue(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1392,7 +1392,7 @@ def testBigFillValue(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1453,7 +1453,7 @@ def testNaNFillValue(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1535,7 +1535,7 @@ def testPutObjRefDataset(self): helper.validateId(root_uuid) # create new group - payload = {"link": {"id": root_uuid, "name": "g1"}} + payload = {"link": {"id": root_uuid, "name": "g1" + helper.getRandomName()}} req = helper.getEndpoint() + "/groups" rsp = self.session.post(req, data=json.dumps(payload), headers=headers) self.assertEqual(rsp.status_code, 201) @@ -1604,7 +1604,7 @@ def testPutObjRefDatasetBinary(self): helper.validateId(root_uuid) # create new group - payload = {"link": {"id": root_uuid, "name": "g1"}} + payload = {"link": {"id": root_uuid, "name": "g1" + helper.getRandomName()}} req = helper.getEndpoint() + "/groups" rsp = self.session.post(req, data=json.dumps(payload), headers=headers) self.assertEqual(rsp.status_code, 201) @@ -1886,7 +1886,7 @@ def testResizable1DValue(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -1974,7 +1974,7 @@ def testAppend1DJson(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2070,7 +2070,7 @@ def testAppend1DBinary(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2168,7 +2168,7 @@ def testAppend2DJson(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2487,7 +2487,7 @@ def testGetSelectionChunkedRefDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2650,7 +2650,7 @@ def testChunkedRefIndirectDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2832,7 +2832,7 @@ def testChunkedRefIndirectS3UriDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -2968,7 +2968,7 @@ def testChunkInitializerDataset(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -3150,7 +3150,7 @@ def testIntelligentRangeGet1D(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -3263,7 +3263,7 @@ def testIntelligentRangeGet2D(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -3381,7 +3381,7 @@ def testIntelligentRangeGet3D(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -3493,7 +3493,7 @@ def testIntelligentRangeGetFillValue(self): self.assertTrue(helper.validateId(dset_id)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_id} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -3550,7 +3550,7 @@ def testLargeCreationProperties(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -3605,7 +3605,7 @@ def testValueReinitialization1D(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = f"{self.endpoint}/groups/{root_uuid}/links/{name}" payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -3683,7 +3683,7 @@ def testShapeReinitialization2D(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = f"{self.endpoint}/groups/{root_uuid}/links/{name}" payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -3802,7 +3802,7 @@ def testShapeReinitialization3D(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = f"{self.endpoint}/groups/{root_uuid}/links/{name}" payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) diff --git a/tests/integ/vlen_test.py b/tests/integ/vlen_test.py index 333af18f..e45504e6 100755 --- a/tests/integ/vlen_test.py +++ b/tests/integ/vlen_test.py @@ -68,7 +68,7 @@ def testPutVLenInt(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -167,7 +167,7 @@ def testPutVLenIntBinary(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -249,7 +249,7 @@ def testPutVLen2DInt(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -329,7 +329,7 @@ def testPutVLenString(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -407,7 +407,7 @@ def testPutVLenStringBinary(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -516,7 +516,7 @@ def testPutVLenCompound(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -623,7 +623,7 @@ def testPutVLenCompoundBinary(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) @@ -751,7 +751,7 @@ def testPutVlenVlenError(self): self.assertTrue(helper.validateId(dset_uuid)) # link new dataset as 'dset' - name = "dset" + name = "dset" + helper.getRandomName() req = self.endpoint + "/groups/" + root_uuid + "/links/" + name payload = {"id": dset_uuid} rsp = self.session.put(req, data=json.dumps(payload), headers=headers) diff --git a/tests/perf/stream/helper.py b/tests/perf/stream/helper.py index 13f19f7f..94ad1429 100644 --- a/tests/perf/stream/helper.py +++ b/tests/perf/stream/helper.py @@ -81,6 +81,12 @@ def getTestDomainName(name): return domain +def getRandomName(): + """Return a random name""" + random_str = ''.join(random.choices(string.ascii_lowercase + string.digits, k=8)) + return random_str + + def getRequestHeaders(domain=None, username=None, bucket=None, password=None, **kwargs): """Get default request headers for domain""" if username is None: