forked from phoedos/pmd
Fix tests
This commit is contained in:
@ -124,7 +124,7 @@ class GlobalListenerTest {
|
||||
PMDConfiguration config = new PMDConfiguration();
|
||||
config.setAnalysisCache(new NoopAnalysisCache());
|
||||
config.setIgnoreIncrementalAnalysis(true);
|
||||
config.setThreads(1);
|
||||
config.setThreads(0); // no multithreading for this test
|
||||
return config;
|
||||
}
|
||||
|
||||
|
@ -65,8 +65,8 @@ class PmdRunnableTest {
|
||||
reporter = mock(MessageReporter.class);
|
||||
configuration.setReporter(reporter);
|
||||
// exceptions thrown on a worker thread are not thrown by the main thread,
|
||||
// so this test only makes sense with one thread
|
||||
configuration.setThreads(1);
|
||||
// so this test only makes sense without separate threads
|
||||
configuration.setThreads(0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -233,7 +233,7 @@ abstract class BaseParsingHelper<Self : BaseParsingHelper<Self, T>, T : RootNode
|
||||
suppressMarker = params.suppressMarker
|
||||
forceLanguageVersion = defaultVersion
|
||||
isIgnoreIncrementalAnalysis = true
|
||||
threads = 1
|
||||
threads = 0 // don't use separate threads for rule execution
|
||||
}
|
||||
|
||||
return PmdAnalysis.create(config).use { pmd ->
|
||||
|
@ -226,7 +226,7 @@ public abstract class RuleTst {
|
||||
PMDConfiguration configuration = new PMDConfiguration();
|
||||
configuration.setIgnoreIncrementalAnalysis(true);
|
||||
configuration.setDefaultLanguageVersion(languageVersion);
|
||||
configuration.setThreads(1);
|
||||
configuration.setThreads(0); // don't use separate threads
|
||||
configuration.prependAuxClasspath(".");
|
||||
|
||||
try (PmdAnalysis pmd = PmdAnalysis.create(configuration)) {
|
||||
|
Reference in New Issue
Block a user