Fix test include pattern to include *Test.class
We missed *Test.class which is not our convention but we could miss some tests. We should better include the *Test.class tests as well.
This commit is contained in:
parent
7e1d8a6ca3
commit
ba13930b32
2
pom.xml
2
pom.xml
|
@ -356,9 +356,11 @@
|
||||||
</balancers>
|
</balancers>
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*Tests.class</include>
|
<include>**/*Tests.class</include>
|
||||||
|
<include>**/*Test.class</include>
|
||||||
</includes>
|
</includes>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>**/Abstract*.class</exclude>
|
<exclude>**/Abstract*.class</exclude>
|
||||||
|
<exclude>**/*StressTest.class</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
<jvmArgs>
|
<jvmArgs>
|
||||||
<param>-Xmx512m</param>
|
<param>-Xmx512m</param>
|
||||||
|
|
|
@ -29,7 +29,7 @@ import java.util.zip.CRC32;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ChecksumBenchmarkTest {
|
public class ChecksumBenchmark {
|
||||||
|
|
||||||
public static final int BATCH_SIZE = 16 * 1024;
|
public static final int BATCH_SIZE = 16 * 1024;
|
||||||
|
|
|
@ -26,6 +26,7 @@ import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.common.unit.SizeValue;
|
import org.elasticsearch.common.unit.SizeValue;
|
||||||
import org.elasticsearch.index.query.QueryBuilders;
|
import org.elasticsearch.index.query.QueryBuilders;
|
||||||
import org.elasticsearch.node.Node;
|
import org.elasticsearch.node.Node;
|
||||||
|
import org.junit.Ignore;
|
||||||
|
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
|
|
||||||
|
@ -35,7 +36,7 @@ import static org.elasticsearch.node.NodeBuilder.nodeBuilder;
|
||||||
/**
|
/**
|
||||||
* Checks that index operation does not create duplicate documents.
|
* Checks that index operation does not create duplicate documents.
|
||||||
*/
|
*/
|
||||||
public class ConcurrentIndexingVersioningTest {
|
public class ConcurrentIndexingVersioningStressTest {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
|
@ -21,17 +21,17 @@ package org.elasticsearch.test.unit.common.settings;
|
||||||
|
|
||||||
import org.elasticsearch.common.settings.NoClassSettingsException;
|
import org.elasticsearch.common.settings.NoClassSettingsException;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.test.unit.common.settings.bar.BarTest;
|
import org.elasticsearch.test.integration.ElasticsearchTestCase;
|
||||||
import org.elasticsearch.test.unit.common.settings.foo.FooTest;
|
import org.elasticsearch.test.unit.common.settings.bar.BarTestClass;
|
||||||
|
import org.elasticsearch.test.unit.common.settings.foo.FooTestClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilder;
|
import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilder;
|
||||||
import static org.hamcrest.MatcherAssert.assertThat;
|
|
||||||
import static org.hamcrest.Matchers.*;
|
import static org.hamcrest.Matchers.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public class ImmutableSettingsTests {
|
public class ImmutableSettingsTests extends ElasticsearchTestCase{
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetAsClass() {
|
public void testGetAsClass() {
|
||||||
|
@ -41,24 +41,24 @@ public class ImmutableSettingsTests {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Assert that defaultClazz is loaded if setting is not specified
|
// Assert that defaultClazz is loaded if setting is not specified
|
||||||
assertThat(settings.getAsClass("no.settings", FooTest.class, "org.elasticsearch.test.unit.common.settings.", "Test").getName(),
|
assertThat(settings.getAsClass("no.settings", FooTestClass.class, "org.elasticsearch.test.unit.common.settings.", "TestClass").getName(),
|
||||||
equalTo(FooTest.class.getName()));
|
equalTo(FooTestClass.class.getName()));
|
||||||
|
|
||||||
// Assert that correct class is loaded if setting contain name without package
|
// Assert that correct class is loaded if setting contain name without package
|
||||||
assertThat(settings.getAsClass("test.class", FooTest.class, "org.elasticsearch.test.unit.common.settings.", "Test").getName(),
|
assertThat(settings.getAsClass("test.class", FooTestClass.class, "org.elasticsearch.test.unit.common.settings.", "TestClass").getName(),
|
||||||
equalTo(BarTest.class.getName()));
|
equalTo(BarTestClass.class.getName()));
|
||||||
|
|
||||||
// Assert that class cannot be loaded if wrong packagePrefix is specified
|
// Assert that class cannot be loaded if wrong packagePrefix is specified
|
||||||
try {
|
try {
|
||||||
settings.getAsClass("test.class", FooTest.class, "com.example.elasticsearch.test.unit..common.settings.", "Test");
|
settings.getAsClass("test.class", FooTestClass.class, "com.example.elasticsearch.test.unit..common.settings.", "TestClass");
|
||||||
assertThat("Class with wrong package name shouldn't be loaded", false);
|
fail("Class with wrong package name shouldn't be loaded");
|
||||||
} catch (NoClassSettingsException ex) {
|
} catch (NoClassSettingsException ex) {
|
||||||
// Ignore
|
// Ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assert that package name in settings is getting correctly applied
|
// Assert that package name in settings is getting correctly applied
|
||||||
assertThat(settings.getAsClass("test.class.package", FooTest.class, "com.example.elasticsearch.test.unit.common.settings.", "Test").getName(),
|
assertThat(settings.getAsClass("test.class.package", FooTestClass.class, "com.example.elasticsearch.test.unit.common.settings.", "TestClass").getName(),
|
||||||
equalTo(BarTest.class.getName()));
|
equalTo(BarTestClass.class.getName()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.test.unit.common.settings.bar;
|
package org.elasticsearch.test.unit.common.settings.bar;
|
||||||
|
|
||||||
/**
|
//used in ImmutableSettingsTest
|
||||||
*
|
public class BarTestClass {
|
||||||
*/
|
|
||||||
public class BarTest {
|
|
||||||
}
|
}
|
|
@ -19,8 +19,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.test.unit.common.settings.foo;
|
package org.elasticsearch.test.unit.common.settings.foo;
|
||||||
|
|
||||||
/**
|
// used in ImmutableSettingsTest
|
||||||
*
|
public class FooTestClass {
|
||||||
*/
|
|
||||||
public class FooTest {
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue