Skip to content

Commit 1a32c9c

Browse files
authored
dataconnect(change): internal refactor of connectorResourceName variable names (#8025)
1 parent 98b8e48 commit 1a32c9c

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

firebase-dataconnect/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
([#7957](https://github.com/firebase/firebase-android-sdk/pull/7957))
1010
- [changed] Internal refactor for calculating debug logging strings.
1111
([#8024](https://github.com/firebase/firebase-android-sdk/pull/8024))
12+
- [changed] Internal refactor to use more descriptive variable names.
13+
([#8025](https://github.com/firebase/firebase-android-sdk/pull/8025))
1214

1315
# 17.2.0
1416

firebase-dataconnect/src/main/kotlin/com/google/firebase/dataconnect/core/DataConnectGrpcClient.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ internal class DataConnectGrpcClient(
4747
val instanceId: String
4848
get() = logger.nameWithId
4949

50-
private val requestName =
50+
private val connectorResourceName =
5151
"projects/$projectId/" +
5252
"locations/${connector.location}" +
5353
"/services/${connector.serviceId}" +
@@ -67,7 +67,7 @@ internal class DataConnectGrpcClient(
6767
fetchPolicy: FetchPolicy,
6868
): OperationResult {
6969
val request = executeQueryRequest {
70-
this.name = requestName
70+
this.name = connectorResourceName
7171
this.operationName = operationName
7272
this.variables = variables
7373
}
@@ -87,7 +87,7 @@ internal class DataConnectGrpcClient(
8787
callerSdkType: FirebaseDataConnect.CallerSdkType,
8888
): OperationResult {
8989
val request = executeMutationRequest {
90-
this.name = requestName
90+
this.name = connectorResourceName
9191
this.operationName = operationName
9292
this.variables = variables
9393
}

firebase-dataconnect/src/test/kotlin/com/google/firebase/dataconnect/core/DataConnectGrpcClientUnitTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,14 @@ class DataConnectGrpcClientUnitTest {
170170
fetchPolicy
171171
)
172172

173-
val expectedName =
173+
val expectedConnectorResourceName =
174174
"projects/${projectId}" +
175175
"/locations/${connectorConfig.location}" +
176176
"/services/${connectorConfig.serviceId}" +
177177
"/connectors/${connectorConfig.connector}"
178178
val expectedRequest =
179179
ExecuteQueryRequest.newBuilder()
180-
.setName(expectedName)
180+
.setName(expectedConnectorResourceName)
181181
.setOperationName(operationName)
182182
.setVariables(variables)
183183
.build()
@@ -200,14 +200,14 @@ class DataConnectGrpcClientUnitTest {
200200
fun `executeMutation() should send the right ExecuteMutationRequest`() = runTest {
201201
dataConnectGrpcClient.executeMutation(requestId, operationName, variables, callerSdkType)
202202

203-
val expectedName =
203+
val expectedConnectorResourceName =
204204
"projects/${projectId}" +
205205
"/locations/${connectorConfig.location}" +
206206
"/services/${connectorConfig.serviceId}" +
207207
"/connectors/${connectorConfig.connector}"
208208
val expectedRequest =
209209
ExecuteMutationRequest.newBuilder()
210-
.setName(expectedName)
210+
.setName(expectedConnectorResourceName)
211211
.setOperationName(operationName)
212212
.setVariables(variables)
213213
.build()

0 commit comments

Comments
 (0)