草庐IT

test_tasks

全部标签

hadoop - 如何修复 "Task attempt_201104251139_0295_r_000006_0 failed to report status for 600 seconds."

我编写了一个mapreduce作业来从数据集中提取一些信息。该数据集是用户对电影的评价。用户数约250K,电影数约300k。map的输出是*>and*>.在reducer中,我将处理这些对。但是当我运行作业时,mapper按预期完成,但reducer总是提示Taskattempt_*failedtoreportstatusfor600seconds.我知道这是由于无法更新状态,所以我添加了对context.progress()的调用在我的代码中是这样的:intcount=0;while(values.hasNext()){if(count++%100==0){context.progr

php - 拉维尔 4.2 : Test Case Autoloading

现在,当我为我的Laravel应用程序设置一个新测试时,它从基础TestCase类扩展classSomeTestextendsTestCase{}我想创建一个名为AnotherTestCase的新基测试类,这样我就可以创建共享设置/拆卸/辅助方法等的测试用例...classSomeTestextendsAnotherTestCase{}但是,当我运行phpunitapp/tests/SomeTest.php出现以下错误PHPFatalerror:Class'AnotherTestCase'notfoundin/[...]/app/tests/SomeTest.phponline3尽管我

php - PHPUnit 测试需要在 "/test"目录中吗?

使用PHPUnit时,是否需要将测试放在/tests目录中?PHPUnit如何知道测试是“测试”?它是解析文件并查找方法名称,还是使用某种文件命名约定? 最佳答案 itrequiredforteststobeinsideofa/testsdirectory?没有。HowdoesPHPUnitknowthatatestisa"test"?通过反射(以及由用户指定要查看的目录)。 关于php-PHPUnit测试需要在"/test"目录中吗?,我们在StackOverflow上找到一个类似的问

php - 如何使用 Zend_Application 引导 Zend_Test_PHPUnit_ControllerTestCase?

我习惯于为我的应用程序使用PHPUnit_Framework_TestCase在ZendFramework1.9中编写单元测试。现在我正在尝试通过使用ZendFramework的Zend_Application的Bootstrap来编写基于Zend_Test_PHPUnit_ControllerTestCase的单元测试。但是我无法让它运行。这是我的非工作示例:classFamilyControllerTestextendsZend_Test_PHPUnit_ControllerTestCase{public$application;publicfunctionsetUp(){$thi

PHPUnit 和 Git : How to test with unreadable file?

简短版本:对于单元测试,我需要一个不可读的文件来确保抛出正确的异常。显然,Git无法存储那个不可读的文件,所以我在测试时chmod000并使用gitupdate-index--assume-unchanged这样Git就不会“t尝试存储不可读的文件。但是后来我无法checkout不同的分支,但收到错误消息“您对以下文件的本地更改将被checkout覆盖。”是否有更好的测试方法,或者更好的Git使用方法,以便一切正常运行?长版本:在一个类中,我有一个方法来读取文件,以便可以将其内容导入数据库:publicfunctionreadFile($path){...if(!is_readable

php - 第 2 行的 fatal error : Call to undefined function mysql_connect() in C:\Apache\htdocs\test. php

fatalerror:在第2行调用C:\Apache\htdocs\test.php中未定义的函数mysql_connect()我今天花了11个小时试图解决这个问题。我已经安装:MySQL5.1Apache2.2.14PHP5.2.17这些是“PHP和MySQL”一书中提到的版本。当我运行脚本时:其中localhost、root和密码是此给定测试的真实值系统,我所看到的是:fatalerror:在第2行调用C:\Apache\htdocs\test.php中未定义的函数mysql_connect() 最佳答案 取消注释“php.in

安卓错误 :Execution failed for task ':app:packageDebug'

我的功能publicstaticStringpostFile(Stringurl,StringfileName,StringuserName)throwsException{HttpClientclient=newDefaultHttpClient();HttpPostpost=newHttpPost(url);MultipartEntityBuilderbuilder=MultipartEntityBuilder.create();builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);finalFilefile=newFile(f

java - 错误 :Execution failed for task ':app:dexDebug' in android studio

我遇到未知类型的错误“错误:任务‘:app:dexDebug’的执行失败。”com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process'command'C:\ProgramFiles\Java\jdk1.8.0_51\bin\java.exe''finishedwithnon-zeroexitvalue1`我的build.gradle:-applyplugin:'com.android.application'android{compileSdkVer

android - 应用发明家 : Asynchonous tasks?

有没有办法在MITAppInventor中使用多个线程?我试图在应用程序执行其他操作时保持while循环,这可能吗? 最佳答案 不,那不可能,AppInventor是单线程的,另请参见themodelofeventprocessinginAppInventor林恩。因此,您最好使用clock组件而不是while循环。另请参阅我的doSomething示例 关于android-应用发明家:Asynchonoustasks?,我们在StackOverflow上找到一个类似的问题:

Android Espresso 测试 : how test an activity's onNewIntent?

我想知道是否有一种方法可以测试ActiviyonNewIntent()方法,我想测试启动一个带有标志单顶设置的Activity并测试一些行为,这是如何实现的加Espresso? 最佳答案 直接调用:当您在Activity中覆盖onNewIntent()时,您可以将其公开:@OverridepublicvoidonNewIntent(Intentintent){super.onNewIntent(intent);}这样你就可以直接调用它了:activityTestRule.getActivity().onNewIntent(newIn