- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的 Espresso 测试在 Espresso 版本 2.2.2
上运行良好,但是当我将我的工作室更新到最新版本并应用迁移规则时,测试将失败并需要更新版本。
库使用
androidTestImplementation'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support.test.espresso:espresso-idling-resource:3.0.1'
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:1.0.1'
androidTestImplementation "com.android.support:support-annotations:${support}"
implementation fileTree(include: ['*.jar'], dir: 'libs')
对于测试期间的空闲资源,我使用 IdlingResourceSample我也试过idling-resource-intent-service因为我正在使用 IntentService
和 BroadcastReceiver
。
因为 Espresso
有问题 Espresso.onIdle & Espresso IdlingResourceRegistry.sync已经报告并将在下一个版本中修复。我使用 IdlingRegistry
进行注册。但我仍然得到 AppNotIdleException
日志猫
android.support.test.espresso.AppNotIdleException: Looped for 35 iterations over 60 SECONDS. The following Idle Conditions failed ASYNC_TASKS_HAVE_IDLED.
at dalvik.system.VMStack.getThreadStackTrace(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:1538)
at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:90)
at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:52)
at android.support.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:312)
at android.support.test.espresso.ViewInteraction.check(ViewInteraction.java:291)
at com.company.project.InstrumentedDeepLinkTest.setDeepLinkUri(InstrumentedDeepLinkTest.java:107)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2075)
我已经从 developer Options
中禁用了动画
在分析了哪个 AsyncTask
让我的 App
忙碌之后,我得到了 thread pool
有很多 AsyncTask
相关到 sun.misc.Unsafe.park(Unsafe.java:299)
。
线程池
AsyncTask #9: WAITING
02-21 16:16:39.955 1611-1670/com.myCompany.MyProject W/System.err: java.lang.Object.wait(Native Method)
02-21 16:16:39.955 1611-1670/com.myCompany.MyProject W/System.err: java.lang.Thread.parkFor$(Thread.java:1220)
02-21 16:16:39.955 1611-1670/com.myCompany.MyProject W/System.err: sun.misc.Unsafe.park(Unsafe.java:299)
02-21 16:16:39.955 1611-1670/com.myCompany.MyProject W/System.err: java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
02-21 16:16:39.955 1611-1670/com.myCompany.MyProject W/System.err: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2013)
02-21 16:16:39.955 1611-1670/com.myCompany.MyProject W/System.err: java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
02-21 16:16:39.955 1611-1670/com.myCompany.MyProject W/System.err: java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1036)
02-21 16:16:39.955 1611-1670/com.myCompany.MyProject W/System.err: java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1098)
02-21 16:16:39.955 1611-1670/com.myCompany.MyProject W/System.err: java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
02-21 16:16:39.955 1611-1670/com.myCompany.MyProject W/System.err: java.lang.Thread.run(Thread.java:818)
最佳答案
在此 Google Group thread 上找到了解决方案
我有一个正在淡出的进度条,但没有将可见性设置为 GONE
,所以它不断更新 ui。因此,尽管后台工作已完成并且空闲资源已设置为空闲,但应用程序永远不会空闲。
关于android - 由于 App not Idle 异常 : The following Idle Conditions failed ASYNC_TASKS_HAVE_IDLED,Espresso 测试失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48887518/
我有一个奇怪的问题。根据像this这样的帖子我希望 IDLE 比在命令行上运行我的代码慢。然而,我看到完全相反的情况。 该程序比较两个文件并将匹配行配对在一起并将所有匹配项写入新文件。我认为它类似于
我使用 emacs-24.5.1 浏览了 linux 内核代码,并使用 cedet(内联在 emacs 中)进行语义解析。 经过一些常规配置后,我用emacs打开init/main.c,出现了“Par
我写的字符串很长。为了便于阅读,我想将文本换行到多行。这是怎么做到的。我以前看过说明,但现在找不到了。 最佳答案 [这个答案一般适用于 Python,并不特定于 IDLE。] 对于没有嵌入换行符的长字
是否有任何现有的网络应用程序可以让多个用户同时使用交互式 IDLE 类型 session ? 类似于: IDLE 2.6.4 Morgan: >>> letters = list("abcdefg")
我是编程新手,我决定先学Python,所以; 我安装了 Python,最新版本 3.4。我正在尝试打开 Python IDLE(GUI) 模式,所以当我打开时,我收到消息“IDLE 的子进程没有建立连
最近很多用户发现system idle process占用率特别高,不知道什么意思,想要解决它。这个只是显示电脑剩余内存的,下面来看看想想的介绍吧。 system idle process占用率高
默认的 ATL 简单对象在其 IDL 文件的顶部具有以下内容: import "oaidl.idl"; import "ocidl.idl"; 这些文件有什么用,我怎么知道什么时候需要导入它们?是否有
这个问题在这里已经有了答案: How to clear the interpreter console? (30 个答案) 关闭 9 年前。 我正在运行一个脚本,该脚本使用的模块会在屏幕上打印很多内
这里 TP_DSCVoyChange 类有 KEY_DSC作为一个属性,我们要填充此 KEY_DSC 使用 TP_DSCVoyChange 使用 String 值从 Java 获取值构造函数。例如。
在我的 Mac 上,我通过自制软件安装了 python 3.9。 我尝试启动空闲并收到此错误: > idle3 ** IDLE can't import Tkinter. Your Python ma
我正在使用 this用于检测用户在我的应用程序中是否空闲的库。我正在使用 StartWatching(),在 onTimerStart 中,我现在只是打印控制台。 当用户空闲 N 秒时,onTimer
我们有一个 .NET 程序集(实际上是 Aspose.Words),我们希望客户端能够轻松地从 COM 客户端使用它。 因此,我们随程序集提供了 .TLB,以便客户端可以通过 C++ 或 Delphi
在之前的函数中,我创建并返回了一个哈希值。执行此操作后,它将哈希作为结构返回,我将其用作此以下函数的输入。 myStruct 的每个标签都是一个结构,每个都有一个名称和数据类型标签。 我正在尝试遍历每
假设我创建了以下 IDL 文件: module ProviderTest { interface Multiplier { long twice(in long number)
我有一个IDL文件,我使用scipy中的readsav将其导入Python,我更改了文件中的参数,我想将其导出/保存回原始格式,IDL可读。 这就是我导入它的方式: from scipy.io.idl
我正在尝试替换/删除文本文档中的一些行。该文档采用 ISO-8859-1 字符编码。 当我尝试将此行复制到我的 Python 脚本中进行替换时,它不会匹配。如果我缩短该行并删除直到第一个双引号 "它将
我的 Espresso 测试在 Espresso 版本 2.2.2 上运行良好,但是当我将我的工作室更新到最新版本并应用迁移规则时,测试将失败并需要更新版本。 库使用 androidTestImple
2013 年 4 月 15 日决议。 在 Windows 7(64 位)Windows 资源管理器中,当我右键单击 Python 文件并选择“使用 IDLE 编辑”时,编辑器会正确打开,但是当我运行(
我用的是3.8.10版本的Python.(32位)。我正在尝试在IDLE中导入NumPy包,但是我收到了这个消息。图像。我的Idle崩溃了,并显示以下信息。同样的事情也发生在其他包上,比如:Chain
IDL是什么意思?我用谷歌搜索了一下,发现它代表接口(interface)定义语言,用于组件的接口(interface)定义。但是,在实践中,IDL 的目的是什么?微软使用它吗? 最佳答案 接口(in
我是一名优秀的程序员,十分优秀!