From 0efadb5dbe11b5e0084c756f01bf2183d4b7ab21 Mon Sep 17 00:00:00 2001 From: Ricardo Alves de Souza Date: Tue, 6 Oct 2026 05:27:47 +0100 Subject: [PATCH] android: update TrainingModuleE2ETest missing-file assertions TrainingModule checks paths with ExecuTorchRuntime.validateFilePath since #17648, so the "!!" messages these two tests expect are never produced and both tests fail. Expect the current messages and pass the assertEquals arguments as (expected, actual). Signed-off-by: Ricardo Alves de Souza --- .../pytorch/executorch/training/TrainingModuleE2ETest.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/training/TrainingModuleE2ETest.kt b/extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/training/TrainingModuleE2ETest.kt index dbc4f0a5072..9b2d7cb3857 100644 --- a/extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/training/TrainingModuleE2ETest.kt +++ b/extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/training/TrainingModuleE2ETest.kt @@ -195,8 +195,9 @@ class TrainingModuleE2ETest { TrainingModule.load(TestFileUtils.getTestFilePath(MISSING_PTE_NAME)) } Assert.assertEquals( + "Cannot load model path: path does not exist: " + + TestFileUtils.getTestFilePath(MISSING_PTE_NAME), exception.message, - "Cannot load model path!! " + TestFileUtils.getTestFilePath(MISSING_PTE_NAME), ) } @@ -217,8 +218,9 @@ class TrainingModuleE2ETest { ) } Assert.assertEquals( + "Cannot load data path: path does not exist: " + + TestFileUtils.getTestFilePath(MISSING_PTD_NAME), exception.message, - "Cannot load data path!! " + TestFileUtils.getTestFilePath(MISSING_PTD_NAME), ) }