From d656f7fe4e4637a16953db7019f3c93af6be4c6f Mon Sep 17 00:00:00 2001 From: Sanketh Nalli Date: Wed, 13 Dec 2023 23:44:16 -0800 Subject: [PATCH] comments and varnames --- .../com/github/ambry/cloud/CloudBlobStoreTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ambry-cloud/src/test/java/com/github/ambry/cloud/CloudBlobStoreTest.java b/ambry-cloud/src/test/java/com/github/ambry/cloud/CloudBlobStoreTest.java index 3c76b620c4..37acf363ee 100644 --- a/ambry-cloud/src/test/java/com/github/ambry/cloud/CloudBlobStoreTest.java +++ b/ambry-cloud/src/test/java/com/github/ambry/cloud/CloudBlobStoreTest.java @@ -1631,32 +1631,32 @@ public void testCreateTableEntity() throws ReflectiveOperationException { Add some permanent blobs. set isVcr = true so that the lifeVersion is 0, else it is -1 */ - int numBlobs = 10; - IntStream.range(0,numBlobs).forEach(i -> CloudTestUtil.addBlobToMessageSet(messageWriteSet, 1024, + final int NUM_BLOBS = 10; + IntStream.range(0,NUM_BLOBS).forEach(i -> CloudTestUtil.addBlobToMessageSet(messageWriteSet, 1024, Utils.Infinite_Time, refAccountId, refContainerId, false, false, partitionId, System.currentTimeMillis(), isVcr)); // Test constants - final String CORRUPT_BLOB_IDS = "corruptBlobIds"; + final String TABLE_NAME = "corruptBlobIds"; final String ROW_KEY = "localhost"; final String PROPERTY = "replicaPath"; final String VALUE = "/mnt/disk/1234"; // Clear table - TableClient tableClient = ((AzureCloudDestinationSync) dest).getTableClient(CORRUPT_BLOB_IDS); + TableClient tableClient = ((AzureCloudDestinationSync) dest).getTableClient(TABLE_NAME); // Don't delete the table, because getTableClient populates its cache with tableClient. // If we delete the table, then the cached ref is dangling. tableClient.listEntities().forEach(tableEntity -> tableClient.deleteEntity(tableEntity)); assertEquals(0, tableClient.listEntities().stream().count()); // Add some rows to the table - // TableEntity = (partition-key, row-key) + // TableEntity = (partition-key, row-key) + more columns // Add several times to assert row is added only once messageWriteSet.getMessageSetInfo().forEach(messageInfo -> IntStream.range(0,3).forEach(i -> - dest.createTableEntity(CORRUPT_BLOB_IDS, + dest.createTableEntity(TABLE_NAME, new TableEntity(messageInfo.getStoreKey().getID(), ROW_KEY).addProperty(PROPERTY, VALUE)))); - assertEquals(numBlobs, tableClient.listEntities().stream().count()); + assertEquals(NUM_BLOBS, tableClient.listEntities().stream().count()); // Check rows are as expected messageWriteSet.getMessageSetInfo().forEach(messageInfo ->