From dc01a2e9372cdf9b13a87da86ba03117244e7e6c Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 27 Jun 2024 13:11:21 -0500 Subject: [PATCH] Fix rename --- .../sdk/kotlin/services/glacier/internal/TreeHasherTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/glacier/common/test/aws/sdk/kotlin/services/glacier/internal/TreeHasherTest.kt b/services/glacier/common/test/aws/sdk/kotlin/services/glacier/internal/TreeHasherTest.kt index cd082f7824c..9367a4cb1fc 100644 --- a/services/glacier/common/test/aws/sdk/kotlin/services/glacier/internal/TreeHasherTest.kt +++ b/services/glacier/common/test/aws/sdk/kotlin/services/glacier/internal/TreeHasherTest.kt @@ -46,7 +46,7 @@ class TreeHasherTest { private val payloadBytes = "abcdefghijklmnopqrstuvwxyz".encodeToByteArray() // 26 bytes private suspend fun testCalculateHashesWithStream(stream: ByteStream) { - val hasher = TreeHasherImpl(megabyte, ::Sha256) + val hasher = TreeHasherImpl(MEGABYTE, ::Sha256) val hashes = hasher.calculateHashes(stream.toHttpBody()) assertEquals("74df7872289a84fa31b6ae4cfdbac34ef911cfe9357e842c600a060da6a899ae", hashes.fullHash.encodeToHex()) @@ -61,7 +61,7 @@ class TreeHasherTest { async { withTimeout(10_000) { // For sanity, bail out after 10s - (0 until megabyte).forEach { + (0 until MEGABYTE).forEach { // This will yield len(payloadBytes) megabytes of content val source = SdkBuffer().apply { write(payloadBytes) } byteChannel.write(source) @@ -83,7 +83,7 @@ class TreeHasherTest { private var buffer = SdkBuffer() override fun close() {} override fun read(sink: SdkBuffer, limit: Long): Long { - if (count == megabyte) return -1L + if (count == MEGABYTE) return -1L return if (buffer.size > 0L) { // had left over from previous read