Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
0marperez committed Dec 5, 2023
1 parent 5b2a309 commit 00e0032
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public abstract class AbstractAwsSdkClientFactory<
config.useDualStack = config.useDualStack ?: resolveUseDualStack(profile = profile)
config.applicationId = config.applicationId ?: resolveUserAgentAppId(platform, profile)
if (config is CompressionClientConfig.Builder) {
config.disableRequestCompression = config.disableRequestCompression ?: resolveDisableRequestCompression(platform, profile) ?: false
config.requestMinCompressionSizeBytes = config.requestMinCompressionSizeBytes ?: resolveRequestMinCompressionSizeBytes(platform, profile) ?: 10240
config.disableRequestCompression = config.disableRequestCompression ?: resolveDisableRequestCompression(platform, profile)
config.requestMinCompressionSizeBytes = config.requestMinCompressionSizeBytes ?: resolveRequestMinCompressionSizeBytes(platform, profile)
}

finalizeConfig(builder, sharedConfig, profile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import aws.smithy.kotlin.runtime.util.PlatformProvider

/**
* Attempts to resolve disableRequestCompression from specified sources.
* @return The disableRequestCompression setting if found, null if not
* @return The disableRequestCompression setting if found, the default value if not
*/
@InternalSdkApi
public suspend fun resolveDisableRequestCompression(platform: PlatformProvider = PlatformProvider.System, profile: LazyAsyncValue<AwsProfile>): Boolean? =
CompressionSettings.AwsDisableRequestCompression.resolve(platform) ?: profile.get().disableRequestCompression
public suspend fun resolveDisableRequestCompression(platform: PlatformProvider = PlatformProvider.System, profile: LazyAsyncValue<AwsProfile>): Boolean =
CompressionSettings.AwsDisableRequestCompression.resolve(platform) ?: profile.get().disableRequestCompression ?: false
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import aws.smithy.kotlin.runtime.util.PlatformProvider

/**
* Attempts to resolve requestMinCompressionSizeBytes from specified sources.
* @return The requestMinCompressionSizeBytes setting if found, null if not
* @return The requestMinCompressionSizeBytes setting if found, the default value if not
*/
@InternalSdkApi
public suspend fun resolveRequestMinCompressionSizeBytes(platform: PlatformProvider = PlatformProvider.System, profile: LazyAsyncValue<AwsProfile>): Long? =
CompressionSettings.AwsRequestMinCompressionSizeBytes.resolve(platform) ?: profile.get().requestMinCompressionSizeBytes
public suspend fun resolveRequestMinCompressionSizeBytes(platform: PlatformProvider = PlatformProvider.System, profile: LazyAsyncValue<AwsProfile>): Long =
CompressionSettings.AwsRequestMinCompressionSizeBytes.resolve(platform) ?: profile.get().requestMinCompressionSizeBytes ?: 10240
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ abstract class AwsHttpBindingProtocolGenerator : HttpBindingProtocolGenerator()
}

override fun generateProtocolUnitTests(ctx: ProtocolGenerator.GenerationContext) {
val ignoredTests = TestMemberDelta(
setOf(),
)

// The following can be used to generate only a specific test by name.
// val targetedTest = TestMemberDelta(setOf("RestJsonComplexErrorWithNoMessage"), TestContainmentMode.RUN_TESTS)

Expand All @@ -68,7 +64,6 @@ abstract class AwsHttpBindingProtocolGenerator : HttpBindingProtocolGenerator()
requestTestBuilder,
responseTestBuilder,
errorTestBuilder,
ignoredTests,
).generateProtocolTests()
}

Expand Down

0 comments on commit 00e0032

Please sign in to comment.