当通过Maven运行多个JBehave故事时,无法加载sqljdbc_auth.dll

当通过Maven运行多个JBehave故事时,无法加载sqljdbc_auth.dll,第1张

概述当通过Maven运行多个JBehave故事时,无法加载sqljdbc_auth.dll

我正在使用一个有三个模块的Maven项目:

数据库

包含JBehave Story(Story .java,.story和steps .java文件)的模块

另一个包含JBehave Story(Story .java,.story和steps .java文件)

包含JBehave Story的两个模块都具有相同types的运行.story文件和步骤的.java文件。 下面是两个模块具有的.java文件(但为了testing目的,它们有不同的名称):

public class FirstStorIEs extends ConfigurableEmbedder { private sqlDataSourceProvIDer dataSourceProvIDer = new sqlDataSourceProvIDer(); private final CrossReference xref = new CrossReference(); private Context context = new Context(); private Format contextformat = new Contextoutput(context); private ContextVIEw contextVIEw = new JFrameContextVIEw().sized(640,120); private ContextStepMonitor contextStepMonitor = new ContextStepMonitor(context,contextVIEw,xref.getStepMonitor()); public FirstStorIEs() { System.setProperty("jbehave.test","true"); configuredEmbedder().embedderControls().doGenerateVIEwAfterStorIEs(true).doIgnoreFailureInStorIEs(false) .doIgnoreFailureInVIEw(true).doVerboseFailures(true).useThreads(1).useStoryTimeouts("5m"); configuredEmbedder().useEmbedderControls(new PropertyBasedEmbedderControls()); } @Test @OverrIDe public voID run() throws Throwable { Embedder embedder = configuredEmbedder(); try { embedder.runStorIEsAsPaths(storyPaths()); } finally { embedder.generateCrossReference(); } } @OverrIDe public Configuration configuration() { PropertIEs vIEwResources = new PropertIEs(); vIEwResources.put("decorateNonHTML","true"); vIEwResources.put("reports","ftl/jbehave-reports-with-totals.ftl"); return new MostUsefulConfiguration() .useStoryReporterBuilder( new StoryReporterBuilder() .withDefaultFormats()//.withVIEwResources(vIEwResources) .withFormats(contextformat,CONSolE,TXT,HTML_TEMPLATE,XML_TEMPLATE).withFailureTrace(true) .withFailureTraceCompression(true).withCrossReference(xref)) .useStepMonitor(contextStepMonitor); } @OverrIDe public InjectableStepsFactory stepsFactory() { return new InstanceStepsFactory(configuration(),new Steps(dataSourceProvIDer)); } private List<String> storyPaths() { String filter = System.getProperty("story.filter","**/*.story"); return new StoryFinder().findpaths(codeLocationFromClass(this.getClass()),filter,"**/failing_before*.story"); } }

.story文件非常简洁,只有一个场景:

Meta: Narrative: As a user I want to perform an action So that I can achIEve a business goal Scenario: Test scenario Given nothing When I do nothing Then nothing happens

步骤文件只包含一个没有 *** 作的方法,只是为了让一切正常工作。

windows 10 UAP后退button

redirect现有的windows资源pipe理器实例

在windows上获取有线networking名称和安全级别

用于读取input文件的内存映射文件有多安全?

检查是否存在windows驱动器

当通过maven运行两个JBehavetesting时,第一个故事将运行得很好。 但是,当启动第二个故事时,会出现以下消息,并且testing很快就会失败(我可以在没有问题的情况下自行运行第二个故事,只有当它在第一个故事之后运行时):

WARNING: Failed to load the sqljdbc_auth.dll cause : Native library C:windowsSystem32sqljdbc_auth.dll already loaded in another classloader java.sql.sqlException: An attempt by a clIEnt to checkout a Connection has timed out.

在我的故事的run()方法中,有没有什么东西是我忘记做的,以确保故事运行完毕后,一切都被正确地销毁了,所以下一个故事可以正确运行而不会出现问题?

如何以编程方式获取当前audio级别?

设置eclipse的windows驱动程序开发

如何在使用C ++中的SendMessage的应用程序之间传递string

如何为windows事件查看器创buildCRITICAL事件?

在同一个套接字上发送和接收

总结

以上是内存溢出为你收集整理的当通过Maven运行多个JBehave故事时,无法加载sqljdbc_auth.dll全部内容,希望文章能够帮你解决当通过Maven运行多个JBehave故事时,无法加载sqljdbc_auth.dll所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1280430.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-09
下一篇 2022-06-09

发表评论

登录后才能评论

评论列表(0条)

保存