Fix transient settings assertions in ElasticsearchIntegrationTest

We missed to fail if transient settings were modifed in the test since we
compared against persistent settings.
This commit is contained in:
Simon Willnauer 2014-01-03 15:06:03 +01:00
parent 87947cb006
commit fbae6e940b
4 changed files with 5 additions and 4 deletions

View File

@ -37,6 +37,7 @@ import java.util.HashMap;
import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilder;
import static org.hamcrest.Matchers.notNullValue;
@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
public class SimpleBlocksTests extends ElasticsearchIntegrationTest {
@Test

View File

@ -50,11 +50,11 @@ import org.junit.Test;
import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilder;
import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.SUITE;
import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.TEST;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
@ClusterScope(scope = SUITE)
@ClusterScope(scope = TEST)
public class AckTests extends ElasticsearchIntegrationTest {
@Override

View File

@ -23,7 +23,6 @@ import org.elasticsearch.action.search.SearchPhaseExecutionException;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.collect.MapBuilder;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.indices.fielddata.breaker.InternalCircuitBreakerService;
import org.elasticsearch.test.ElasticsearchIntegrationTest;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.junit.Test;
@ -34,6 +33,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
/**
* Integration tests for InternalCircuitBreakerService
*/
@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
public class CircuitBreakerServiceTests extends ElasticsearchIntegrationTest {
@Test

View File

@ -225,7 +225,7 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
assertThat("test leaves persistent cluster metadata behind: " + metaData.persistentSettings().getAsMap(), metaData
.persistentSettings().getAsMap().size(), equalTo(0));
assertThat("test leaves transient cluster metadata behind: " + metaData.transientSettings().getAsMap(), metaData
.persistentSettings().getAsMap().size(), equalTo(0));
.transientSettings().getAsMap().size(), equalTo(0));
}
wipeIndices(); // wipe after to make sure we fail in the test that