2017-05-05 5 views
0

私はJmeterで複数のgitリポジトリをクローンするためにJgitを使用しています。私は10人のスレッドユーザーを通して10の異なるリポジトリをクローニングしています。Jmeter Jgit JSR223Sampler javax.script.ScriptExceptionエラー

以下は私が使用しているコードです。

import org.eclipse.jgit.api.Git; 
    import org.apache.commons.io.FileUtils; 
    import org.eclipse.jgit.revwalk.RevCommit; 
    import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider; 
    import org.eclipse.jgit.transport.CredentialsProvider; 
    def url_var = vars.get("repo_url"); 
    log.info("This is the URL " + url_var) 
    Git git = Git.cloneRepository().setURI(url_var).call(); 

テストの実行中に以下のエラーが発生します。 10個のスレッドのうち

o.a.j.p.j.s.JSR223Sampler: Problem in JSR223 script JSR223 Sampler, message: javax.script.ScriptException: javax.script.ScriptException: org.eclipse.jgit.api.errors.JGitInternalException: Destination path ".git" already exists and is not an empty directory javax.script.ScriptException: javax.script.ScriptException: org.eclipse.jgit.api.errors.JGitInternalException: Destination path ".git" already exists and is not an empty directory at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158) ~[groovy-all-2.4.10.jar:2.4.10] at javax.script.AbstractScriptEngine.eval(Unknown Source) ~[?:1.8.0_73] at org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:222) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sampler.java:69) [ApacheJMeter_java.jar:3.2 r1790748] at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:491) [ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:425) [ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:254) [ApacheJMeter_core.jar:3.2 r1790748] at java.lang.Thread.run(Unknown Source) [?:1.8.0_73]

、8は、クローン操作で成功すると2は、上記のエラーで失敗します。私は宛先を指定していないので、repoディレクトリはデフォルトのjmeter binディレクトリに作成されます。私はrepo dirを指定しようとしましたが、まだが存在し、空のディレクトリではありません。エラーです。

答えて

0

リポジトリごとに異なるフォルダを作成し、コマンドを実行する前にクリーニングして、クローンパーツを実行します。