diff --git a/js/react_native/android/src/androidTest/java/ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java b/js/react_native/android/src/androidTest/java/ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java index 755c01bc6b062..824b814da3e6c 100644 --- a/js/react_native/android/src/androidTest/java/ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java +++ b/js/react_native/android/src/androidTest/java/ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java @@ -217,7 +217,7 @@ public void throwWrongSizeInput() { JavaOnlyMap options = new JavaOnlyMap(); byte[] modelBuffer = getInputModelBuffer(modelStream); ReadableMap loadMap = ortModule.loadModel(modelBuffer, options); - sessionKey = resultMap.getString("key"); + sessionKey = loadMap.getString("key"); int[] dims = new int[] {1, 7}; float[] inputData = new float[] {1.0f, 2.0f, -3.0f, Float.MIN_VALUE, Float.MAX_VALUE, 5f, -6f}; @@ -276,7 +276,7 @@ public void throwWrongRankInput() { reactContext.getResources().openRawResource(ai.onnxruntime.reactnative.test.R.raw.test_types_float)){ byte[] modelBuffer = getInputModelBuffer(modelStream); ReadableMap loadMap = ortModule.loadModel(modelBuffer, options); - sessionKey = resultMap.getString("key"); + sessionKey = loadMap.getString("key"); int[] dims = new int[] {1, 1, 7}; float[] inputData = new float[] {1.0f, 2.0f, -3.0f, Float.MIN_VALUE, Float.MAX_VALUE, 5f, -6f};