Skip to content

Commit 0c370a9

Browse files
DeviceInfracopybara-github
authored andcommitted
Internal change
PiperOrigin-RevId: 739037474
1 parent 24b0c14 commit 0c370a9

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

src/java/com/google/devtools/mobileharness/platform/android/instrumentation/AndroidInstrumentationUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,11 +1209,11 @@ public TestResult getGtestResult(
12091209
boolean isDeviceOnline = systemStateManager.isOnline(deviceId);
12101210
if (!isDeviceOnline) {
12111211
errorMsg.append(String.format("Device %s is not online", deviceId));
1212-
return TestResult.INFRA_ERROR;
1212+
return TestResult.ERROR;
12131213
}
12141214
} catch (MobileHarnessException e) {
12151215
errorMsg.append(e.getMessage());
1216-
return TestResult.INFRA_ERROR;
1216+
return TestResult.ERROR;
12171217
}
12181218

12191219
// Get the test result from the testInfo and check if the individual test cases passed.

src/java/com/google/wireless/qa/mobileharness/shared/api/driver/AndroidInstrumentation.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ private void syncRun(
387387
String deviceId = getDevice().getDeviceId();
388388

389389
boolean hasError = false;
390-
boolean hasInfraError = false;
391390
boolean hasFail = false;
392391
boolean hasPass = false;
393392
MobileHarnessException errorResultCause = null;
@@ -561,14 +560,6 @@ private void syncRun(
561560
"Instrumentation start/finish unexpectedly: " + errorMsg,
562561
mhException);
563562
break;
564-
case INFRA_ERROR:
565-
hasInfraError = true;
566-
infraErrorResultCause =
567-
new MobileHarnessException(
568-
AndroidErrorId.ANDROID_INSTRUMENTATION_TEST_INFRA_ERROR,
569-
"Instrumentation start/finish unexpectedly: " + errorMsg,
570-
mhException);
571-
break;
572563
case TIMEOUT:
573564
MobileHarnessException timeoutCause =
574565
new MobileHarnessException(
@@ -664,13 +655,7 @@ private void syncRun(
664655
logFilenames.toString());
665656

666657
// Uses the worse case as the final result.
667-
if (hasInfraError) {
668-
testInfo
669-
.resultWithCause()
670-
.setNonPassing(
671-
com.google.devtools.mobileharness.api.model.proto.Test.TestResult.ERROR,
672-
infraErrorResultCause);
673-
} else if (hasError) {
658+
if (hasError) {
674659
testInfo
675660
.resultWithCause()
676661
.setNonPassing(

0 commit comments

Comments
 (0)