通过mvn gauge:execute -DspecsDir=specs
控制台输出运行Gauge测试时,DEBUG输出会被污染.
16:33:46.950 [main] DEBUG org.reflections.Reflections - could not scan file META-INF/MANIFEST.MF ...
16:33:46.951 [main] DEBUG org.reflections.Reflections - could not scan file META-INF/MANIFEST.MF ...
16:33:46.951 [main] DEBUG org.reflections.Reflections - could not scan file META-INF/maven/net.minidev/json-smart/pom.properties ...
...
16:35:52.676 [Thread-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing request PUT ...
16:35:52.676 [Thread-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Target auth state: UNCHALLENGED
16:35:52.676 [Thread-1] DEBUG org.apache.http.headers - http-outgoing-0 >> PUT ...
Run Code Online (Sandbox Code Playgroud)
如何设置这些测试的日志级别(通过Maven插件运行时)?
我创建了一个从视频中捕获帧的类.捕获帧时,它将保存为图片.当视频是.avi时,应用程序运行正常.格式为.avi时.
public static void main(String[] args) {
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber("C:/Users/Ioanna/Desktop/video1.avi");
try {
IplImage img;
//Start grabber to capture video
grabber.start();
//grab video frame to IplImage
img = grabber.grab();
if (img != null) {
//save video frame as a picture
cvSaveImage("capture.jpg", img);
}
}catch (Exception e) {
}
}
Run Code Online (Sandbox Code Playgroud)
错误是
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.googlecode.javacv.FFmpegFrameGrabber.<init>(FFmpegFrameGrabber.java:106)
at Video.main(Video.java:75)
Caused by: java.lang.IllegalStateException: Can't overwrite cause with java.lang.UnsatisfiedLinkError: no avcodec in java.library.path
at java.lang.Throwable.initCause(Throwable.java:457)
at com.googlecode.javacpp.Loader.load(Loader.java:581)
at com.googlecode.javacpp.Loader.load(Loader.java:532)
at com.googlecode.javacv.cpp.avcodec.<clinit>(avcodec.java:39) …
Run Code Online (Sandbox Code Playgroud) 我当前的开发环境由 Git/Gerrit 设置组成,它运行多个 Jenkins 作业来验证提交的更改。
Gerrit 中的提交类型设置为“仅快进”。
问题”:
(信息:更改 A/B是同一分支上的提交,并且具有相同的父提交 ID)
此时Change B无法再提交,因为它的父级没有指向分支的HEAD。因此,变更 B的开发人员必须手动重新调整其变更的基础。(此变基创建一个新的补丁集,它会自动触发 Jenkins 作业)
我怎样才能摆脱这个手动步骤?
所以我发现我可以将Gerrit项目的提交类型更改为“Rebase if Necessary”(我也可以告诉Gerrit自动解决冲突)。这里的问题是,在变基并解决潜在冲突后,更改会被合并,而无需重新运行 Jenkins 验证作业。无法检测到可能由于变基或冲突解决而引入的潜在错误。
有没有办法在更改过时时自动重新设置更改基础(在示例更改 B中)并重新运行测试?