Skip to content

Commit 7abe700

Browse files
committed
Changing error to DEADLINE_EXCEEDED
1 parent 8f8c8b1 commit 7abe700

File tree

2 files changed

+16
-1
lines changed
  • v2
    • failure-injected-spanner-service/src/main/java/com/google/cloud/teleport/v2/spanner/service
    • failure-injection-policies/src/test/java/com/google/cloud/teleport/v2/failureinjection

2 files changed

+16
-1
lines changed

v2/failure-injected-spanner-service/src/main/java/com/google/cloud/teleport/v2/spanner/service/SpannerService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void onMessage(RespT message) {
9191
public void onClose(Status status, Metadata metadata) {
9292
if (errorInjected.get()) {
9393
// Return an error as if it has been sent from Spanner.
94-
status = Status.PERMISSION_DENIED.augmentDescription("INJECTED BY TEST");
94+
status = Status.DEADLINE_EXCEEDED.augmentDescription("INJECTED BY TEST");
9595
}
9696
super.onClose(status, metadata);
9797
}

v2/failure-injection-policies/src/test/java/com/google/cloud/teleport/v2/failureinjection/NoOpPolicyTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright (C) 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
116
package com.google.cloud.teleport.v2.failureinjection;
217

318
import static org.junit.Assert.assertFalse;

0 commit comments

Comments
 (0)