Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions firebase-dataconnect/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
([#7957](https://github.com/firebase/firebase-android-sdk/pull/7957))
- [changed] Internal refactor for calculating debug logging strings.
([#8024](https://github.com/firebase/firebase-android-sdk/pull/8024))
- [changed] Internal refactor to use more descriptive variable names.
([#8025](https://github.com/firebase/firebase-android-sdk/pull/8025))

# 17.2.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ internal class DataConnectGrpcClient(
val instanceId: String
get() = logger.nameWithId

private val requestName =
private val connectorResourceName =
"projects/$projectId/" +
"locations/${connector.location}" +
"/services/${connector.serviceId}" +
Expand All @@ -67,7 +67,7 @@ internal class DataConnectGrpcClient(
fetchPolicy: FetchPolicy,
): OperationResult {
val request = executeQueryRequest {
this.name = requestName
this.name = connectorResourceName
this.operationName = operationName
this.variables = variables
}
Expand All @@ -87,7 +87,7 @@ internal class DataConnectGrpcClient(
callerSdkType: FirebaseDataConnect.CallerSdkType,
): OperationResult {
val request = executeMutationRequest {
this.name = requestName
this.name = connectorResourceName
this.operationName = operationName
this.variables = variables
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ class DataConnectGrpcClientUnitTest {
fetchPolicy
)

val expectedName =
val expectedConnectorResourceName =
"projects/${projectId}" +
"/locations/${connectorConfig.location}" +
"/services/${connectorConfig.serviceId}" +
"/connectors/${connectorConfig.connector}"
val expectedRequest =
ExecuteQueryRequest.newBuilder()
.setName(expectedName)
.setName(expectedConnectorResourceName)
.setOperationName(operationName)
.setVariables(variables)
.build()
Expand All @@ -200,14 +200,14 @@ class DataConnectGrpcClientUnitTest {
fun `executeMutation() should send the right ExecuteMutationRequest`() = runTest {
dataConnectGrpcClient.executeMutation(requestId, operationName, variables, callerSdkType)

val expectedName =
val expectedConnectorResourceName =
"projects/${projectId}" +
"/locations/${connectorConfig.location}" +
"/services/${connectorConfig.serviceId}" +
"/connectors/${connectorConfig.connector}"
val expectedRequest =
ExecuteMutationRequest.newBuilder()
.setName(expectedName)
.setName(expectedConnectorResourceName)
.setOperationName(operationName)
.setVariables(variables)
.build()
Expand Down
Loading