From 4ce7e5680223144ae620e11079eaa3299973e087 Mon Sep 17 00:00:00 2001 From: "Maxim.Kolmakov" Date: Thu, 16 May 2024 18:18:20 +0200 Subject: [PATCH] [ui-tests] Don't log error in case method isShowing was invoked on the invalid reference We call isShowing on cache check and it's enough to just throw exception GitOrigin-RevId: f1d5b41f05cecd8fa51c6e5bb9ff62bc539c7f1d --- .../core/src/com/intellij/driver/impl/Invoker.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/remote-driver/core/src/com/intellij/driver/impl/Invoker.java b/platform/remote-driver/core/src/com/intellij/driver/impl/Invoker.java index 4aba59870cc0..be604cbe6044 100644 --- a/platform/remote-driver/core/src/com/intellij/driver/impl/Invoker.java +++ b/platform/remote-driver/core/src/com/intellij/driver/impl/Invoker.java @@ -125,7 +125,10 @@ public class Invoker implements InvokerMBean { instance = findInstance(call, callTarget.clazz()); } catch (Exception e) { - LOG.error("Unable to get instance for " + call); + //we need to ignore caching check and not throw error + if (!call.getMethodName().equals("isShowing")) { + LOG.error("Unable to get instance for " + call); + } throw new DriverIlligalStateException("Unable to get instance for " + call, e); } @@ -616,7 +619,6 @@ public class Invoker implements InvokerMBean { return RefProducer.makeRef(id, rdTarget, value); } } - } record CallTarget(@NotNull Class clazz, @NotNull Method targetMethod) {