SOLR-12028: BadApple and AwaitsFix annotations usage

This commit is contained in:
Erick Erickson 2018-09-20 22:31:49 -07:00
parent 1d604d1b3f
commit dd088fb83e
31 changed files with 95 additions and 15 deletions

View File

@ -69,7 +69,8 @@ public class MoveReplicaHDFSTest extends MoveReplicaTest {
//commented 9-Aug-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Jul-2018
//commented 23-AUG-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 17-Aug-2018
// commented 4-Sep-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 23-Aug-2018
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 6-Sep-2018
//commented 20-Sep-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 6-Sep-2018
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testNormalFailedMove() throws Exception {
inPlaceMove = false;
testFailedMove();

View File

@ -59,7 +59,7 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
@Test
// commented 20-July-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 17-Aug-2018
//commented 20-Sep-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 17-Aug-2018
@ShardsFixed(num = 4)
public void test() throws Exception {
testParallelCollectionAPICalls();

View File

@ -46,6 +46,7 @@ public class TestLeaderInitiatedRecoveryThread extends AbstractFullDistribZkTest
@Test
//17-Aug-2018 commented @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 09-Apr-2018
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testPublishDownState() throws Exception {
waitForRecoveriesToFinish(true);

View File

@ -26,6 +26,7 @@ import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.response.CollectionAdminResponse;
import org.junit.BeforeClass;
import org.junit.Test;
public class TestSkipOverseerOperations extends SolrCloudTestCase {
@ -73,6 +74,8 @@ public class TestSkipOverseerOperations extends SolrCloudTestCase {
CollectionAdminRequest.deleteCollection(collection).process(cluster.getSolrClient());
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testSkipDownOperations() throws Exception {
String overseerLeader = getOverseerLeader();
List<JettySolrRunner> notOverseerNodes = cluster.getJettySolrRunners()

View File

@ -327,7 +327,7 @@ public class TestSolrCloudWithDelegationTokens extends SolrTestCaseJ4 {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 23-Aug-2018
//commented 20-Sep-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 23-Aug-2018
public void testDelegationTokenRenew() throws Exception {
// test with specifying renewer
verifyDelegationTokenRenew("bar", "bar");

View File

@ -260,6 +260,8 @@ public class TestWithCollection extends SolrCloudTestCase {
assertTrue(collection.getReplicas().stream().noneMatch(replica -> withCollection.getReplicas(replica.getNodeName()).isEmpty()));
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testAddReplicaWithPolicy() throws Exception {
String prefix = "testAddReplicaWithPolicy";
String xyz = prefix + "_xyz";

View File

@ -65,6 +65,7 @@ public class UnloadDistributedZkTest extends BasicDistributedZkTest {
@Test
//28-June-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 21-May-2018
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void test() throws Exception {
testCoreUnloadAndLeaders(); // long

View File

@ -89,6 +89,7 @@ public class CollectionsAPIAsyncDistributedZkTest extends SolrCloudTestCase {
@Test
//commented 9-Aug-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 21-May-2018
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testAsyncRequests() throws Exception {
final String collection = "testAsyncOperations";

View File

@ -58,6 +58,7 @@ public class ScheduledTriggerTest extends SolrCloudTestCase {
@Test
//2018-06-18 (commented) @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 09-Apr-2018
//commented 23-AUG-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Jul-2018
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testTrigger() throws Exception {
CoreContainer container = cluster.getJettySolrRunners().get(0).getCoreContainer();

View File

@ -832,7 +832,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 17-Aug-2018
//commented 20-Sep-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 17-Aug-2018
public void doTestStressReplication() throws Exception {
// change solrconfig on slave
// this has no entry for pollinginterval

View File

@ -342,7 +342,9 @@ public class DistributedDebugComponentTest extends SolrJettyTestBase {
response = client.query(query);
assertNull(response.getDebugMap());
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testCompareWithNonDistributedRequest() throws SolrServerException, IOException {
SolrQuery query = new SolrQuery();
query.setQuery("id:1 OR id:2");

View File

@ -22,6 +22,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.solr.client.solrj.impl.HttpClientUtil;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.junit.Test;
/**
*
@ -30,6 +31,8 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient;
*/
public class SolrExceptionTest extends LuceneTestCase {
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testSolrException() throws Throwable {
// test a connection to a solr server that probably doesn't exist
// this is a very simple test and most of the test should be considered verified

View File

@ -36,6 +36,8 @@ import java.util.Map;
public class TestDocumentObjectBinder extends LuceneTestCase {
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testSimple() throws Exception {
DocumentObjectBinder binder = new DocumentObjectBinder();
XMLResponseParser parser = new XMLResponseParser();
@ -79,6 +81,8 @@ public class TestDocumentObjectBinder extends LuceneTestCase {
assertEquals("hello", l.get(0).categories[0]);
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testDynamicFieldBinding() {
DocumentObjectBinder binder = new DocumentObjectBinder();
XMLResponseParser parser = new XMLResponseParser();

View File

@ -40,6 +40,7 @@ public class CloudSolrClientBuilderTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testSingleZkHostSpecified() throws IOException {
try(CloudSolrClient createdClient = new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT))
.build()) {
@ -50,6 +51,7 @@ public class CloudSolrClientBuilderTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testSeveralZkHostsSpecifiedSingly() throws IOException {
final List<String> zkHostList = new ArrayList<>();
zkHostList.add(ANY_ZK_HOST); zkHostList.add(ANY_OTHER_ZK_HOST);
@ -63,6 +65,7 @@ public class CloudSolrClientBuilderTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testSeveralZkHostsSpecifiedTogether() throws IOException {
final ArrayList<String> zkHosts = new ArrayList<String>();
zkHosts.add(ANY_ZK_HOST);
@ -76,6 +79,7 @@ public class CloudSolrClientBuilderTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testByDefaultConfiguresClientToSendUpdatesOnlyToShardLeaders() throws IOException {
try(CloudSolrClient createdClient = new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT)).build()) {
assertTrue(createdClient.isUpdatesToLeaders() == true);
@ -83,6 +87,7 @@ public class CloudSolrClientBuilderTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testIsDirectUpdatesToLeadersOnlyDefault() throws IOException {
try(CloudSolrClient createdClient = new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT)).build()) {
assertFalse(createdClient.isDirectUpdatesToLeadersOnly());
@ -90,6 +95,7 @@ public class CloudSolrClientBuilderTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void test0Timeouts() throws IOException {
try(CloudSolrClient createdClient = new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.empty())
.withSocketTimeout(0)

View File

@ -37,6 +37,7 @@ public class CloudSolrClientMultiConstructorTest extends LuceneTestCase {
Collection<String> hosts;
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testZkConnectionStringSetterWithValidChroot() throws IOException {
boolean setOrList = random().nextBoolean();
int numOfZKServers = TestUtil.nextInt(random(), 1, 5);
@ -75,6 +76,7 @@ public class CloudSolrClientMultiConstructorTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testZkConnectionStringConstructorWithValidChroot() throws IOException {
int numOfZKServers = TestUtil.nextInt(random(), 1, 5);
boolean withChroot = random().nextBoolean();
@ -102,6 +104,7 @@ public class CloudSolrClientMultiConstructorTest extends LuceneTestCase {
}
@Test(expected = IllegalArgumentException.class)
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testBadChroot() {
final List<String> zkHosts = new ArrayList<>();
zkHosts.add("host1:2181");

View File

@ -32,6 +32,7 @@ public class ConcurrentUpdateSolrClientBuilderTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testMissingQueueSize() {
try (ConcurrentUpdateSolrClient client = new Builder("someurl").build()){
// Do nothing as we just need to test that the only mandatory parameter for building the client

View File

@ -44,7 +44,9 @@ public class HttpClientUtilTest extends LuceneTestCase {
public void resetHttpClientBuilder() {
HttpClientUtil.resetHttpClientBuilder();
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testSSLSystemProperties() throws IOException {
assertNotNull("HTTPS scheme could not be created using system defaults",
@ -83,6 +85,7 @@ public class HttpClientUtilTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testToBooleanDefaultIfNull() throws Exception {
assertFalse(HttpClientUtil.toBooleanDefaultIfNull(Boolean.FALSE, true));
assertTrue(HttpClientUtil.toBooleanDefaultIfNull(Boolean.TRUE, false));
@ -91,6 +94,7 @@ public class HttpClientUtilTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testToBooleanObject() throws Exception {
assertEquals(Boolean.TRUE, HttpClientUtil.toBooleanObject("true"));
assertEquals(Boolean.TRUE, HttpClientUtil.toBooleanObject("TRUE"));

View File

@ -17,6 +17,7 @@
package org.apache.solr.client.solrj.impl;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.solr.client.solrj.ResponseParser;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.junit.Test;
@ -37,6 +38,7 @@ public class LBHttpSolrClientTest {
* Validate that the parser passed in is used in the <code>HttpSolrClient</code> instances created.
*/
@Test
@LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testLBHttpSolrClientHttpClientResponseParserStringArray() throws IOException {
CloseableHttpClient httpClient = HttpClientUtil.createClient(new ModifiableSolrParams());
try (

View File

@ -3113,6 +3113,7 @@ public class MathExpressionTest extends SolrCloudTestCase {
@Test
// 12-Jun-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //2018-03-10
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testMultiVariateNormalDistribution() throws Exception {
String cexpr = "let(echo=true," +
" a=array(1,2,3,4,5,6,7)," +

View File

@ -107,6 +107,7 @@ public class StreamExpressionToExpessionTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testDaemonStream() throws Exception {
String expressionString;
@ -219,6 +220,7 @@ public class StreamExpressionToExpessionTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testUpdateStream() throws Exception {
StreamExpression expression = StreamExpressionParser.parse("update("
+ "collection2, "

View File

@ -88,6 +88,7 @@ public class StreamExpressionToExplanationTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testDaemonStream() throws Exception {
// Basic test
try (DaemonStream stream = new DaemonStream(StreamExpressionParser.parse("daemon(search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_i asc\"), id=\"blah\", runInterval=\"1000\", queueSize=\"100\")"), factory)) {
@ -174,6 +175,7 @@ public class StreamExpressionToExplanationTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testUpdateStream() throws Exception {
StreamExpression expression = StreamExpressionParser.parse("update("
+ "collection2, "

View File

@ -29,6 +29,7 @@ import org.junit.Test;
public class TestCollectionAdminRequest extends LuceneTestCase {
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testInvalidCollectionNameRejectedWhenCreatingCollection() {
final SolrException e = expectThrows(SolrException.class, () -> {
CollectionAdminRequest.createCollection("invalid$collection@name", null, 1, 1);
@ -40,6 +41,7 @@ public class TestCollectionAdminRequest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testInvalidShardNamesRejectedWhenCreatingImplicitCollection() {
final SolrException e = expectThrows(SolrException.class, () -> {
CollectionAdminRequest.createCollectionWithImplicitRouter("fine", "fine", "invalid$shard@name",1,0,0);
@ -51,6 +53,7 @@ public class TestCollectionAdminRequest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testInvalidShardNamesRejectedWhenCallingSetShards() {
CollectionAdminRequest.Create request = CollectionAdminRequest.createCollectionWithImplicitRouter("fine",null,"fine",1);
final SolrException e = expectThrows(SolrException.class, () -> {
@ -63,6 +66,7 @@ public class TestCollectionAdminRequest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testInvalidAliasNameRejectedWhenCreatingAlias() {
final SolrException e = expectThrows(SolrException.class, () -> {
CreateAlias createAliasRequest = CollectionAdminRequest.createAlias("invalid$alias@name","ignored");
@ -74,6 +78,7 @@ public class TestCollectionAdminRequest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testInvalidShardNameRejectedWhenCreatingShard() {
final SolrException e = expectThrows(SolrException.class, () -> {
CreateShard createShardRequest = CollectionAdminRequest.createShard("ignored","invalid$shard@name");

View File

@ -44,6 +44,7 @@ import org.junit.Test;
public class TestUpdateRequestCodec extends LuceneTestCase {
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void simple() throws IOException {
UpdateRequest updateRequest = new UpdateRequest();
updateRequest.deleteById("*:*");
@ -110,6 +111,7 @@ public class TestUpdateRequestCodec extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testIteratable() throws IOException {
final List<String> values = new ArrayList<>();
values.add("iterItem1");
@ -159,7 +161,8 @@ public class TestUpdateRequestCodec extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testBackCompat4_5() throws IOException {
UpdateRequest updateRequest = new UpdateRequest();

View File

@ -26,9 +26,12 @@ import org.apache.solr.client.solrj.impl.BinaryRequestWriter;
import org.apache.solr.client.solrj.request.CollectionAdminRequest.Create;
import org.apache.solr.common.util.ContentStreamBase;
import org.apache.solr.common.util.Utils;
import org.junit.Test;
public class TestV1toV2ApiMapper extends LuceneTestCase {
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testCreate() throws IOException {
Create cmd = CollectionAdminRequest
.createCollection("mycoll", "conf1", 3, 2)
@ -44,7 +47,9 @@ public class TestV1toV2ApiMapper extends LuceneTestCase {
assertEquals("3", Utils.getObjectByPath(m,true,"/create/numShards"));
assertEquals("2", Utils.getObjectByPath(m,true,"/create/nrtReplicas"));
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testAddReplica() throws IOException {
CollectionAdminRequest.AddReplica addReplica = CollectionAdminRequest.addReplicaToShard("mycoll", "shard1");
V2Request v2r = V1toV2ApiMapper.convert(addReplica).build();
@ -53,7 +58,9 @@ public class TestV1toV2ApiMapper extends LuceneTestCase {
assertEquals("shard1", Utils.getObjectByPath(m,true,"/add-replica/shard"));
assertEquals("NRT", Utils.getObjectByPath(m,true,"/add-replica/type"));
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testSetCollectionProperty() throws IOException {
CollectionAdminRequest.CollectionProp collectionProp = CollectionAdminRequest.setCollectionProperty("mycoll", "prop", "value");
V2Request v2r = V1toV2ApiMapper.convert(collectionProp).build();

View File

@ -41,6 +41,7 @@ import org.junit.Test;
@Limit(bytes=20000)
public class QueryResponseTest extends LuceneTestCase {
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testRangeFacets() throws Exception {
XMLResponseParser parser = new XMLResponseParser();
NamedList<Object> response = null;
@ -102,6 +103,7 @@ public class QueryResponseTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testGroupResponse() throws Exception {
XMLResponseParser parser = new XMLResponseParser();
NamedList<Object> response = null;
@ -207,6 +209,7 @@ public class QueryResponseTest extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testSimpleGroupResponse() throws Exception {
XMLResponseParser parser = new XMLResponseParser();
NamedList<Object> response = null;
@ -251,7 +254,8 @@ public class QueryResponseTest extends LuceneTestCase {
assertEquals("708_HI", documents.get(9).getFieldValue("acco_id"));
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testIntervalFacetsResponse() throws Exception {
XMLResponseParser parser = new XMLResponseParser();
try(SolrResourceLoader loader = new SolrResourceLoader()) {

View File

@ -62,6 +62,7 @@ public class TestDelegationTokenResponse extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testGetResponse() throws Exception {
DelegationTokenRequest.Get getRequest = new DelegationTokenRequest.Get();
DelegationTokenResponse.Get getResponse = new DelegationTokenResponse.Get();
@ -97,6 +98,7 @@ public class TestDelegationTokenResponse extends LuceneTestCase {
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testRenewResponse() throws Exception {
DelegationTokenRequest.Renew renewRequest = new DelegationTokenRequest.Renew("token");
DelegationTokenResponse.Renew renewResponse = new DelegationTokenResponse.Renew();

View File

@ -23,6 +23,7 @@ import org.apache.solr.common.util.SimpleOrderedMap;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util.TestUtil;
import org.junit.Test;
/** Basic testing of the serialization/encapsulation code in ToleratedUpdateError */
public class TestToleratedUpdateError extends LuceneTestCase {
@ -48,7 +49,9 @@ public class TestToleratedUpdateError extends LuceneTestCase {
String badKey = valid.getMetadataKey().replace(":", "X");
assertNull(ToleratedUpdateError.parseMetadataIfToleratedUpdateError(badKey, valid.getMetadataValue()));
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testParseMapErrorChecking() {
SimpleOrderedMap<String> bogus = new SimpleOrderedMap<String>();
try {

View File

@ -18,6 +18,7 @@ package org.apache.solr.common.params;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.solr.common.SolrException;
import org.junit.Test;
/**
* This class tests backwards compatibility of {@link ShardParams} parameter constants.
@ -49,7 +50,9 @@ public class ShardParamsTest extends LuceneTestCase
public void testRoute() { assertEquals(ShardParams._ROUTE_, "_route_"); }
public void testDistribSinglePass() { assertEquals(ShardParams.DISTRIB_SINGLE_PASS, "distrib.singlePass"); }
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testGetShardsTolerantAsBool() {
ModifiableSolrParams params = new ModifiableSolrParams();
// shards.tolerant param is not set; default should be false

View File

@ -22,6 +22,7 @@ import java.util.Map;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.solr.common.SolrException;
import org.junit.Test;
public class NamedListTest extends LuceneTestCase {
public void testRemove() {
@ -62,7 +63,9 @@ public class NamedListTest extends LuceneTestCase {
assertEquals(5, values.size());
assertEquals(0, nl.size());
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testRemoveArgs() {
NamedList<Object> nl = new NamedList<>();
nl.add("key1", "value1-1");
@ -187,6 +190,8 @@ public class NamedListTest extends LuceneTestCase {
assertNull(enltest4);
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testShallowMap() {
NamedList nl = new NamedList();
nl.add("key1", "Val1");

View File

@ -31,6 +31,7 @@ import java.util.zip.GZIPOutputStream;
*/
public class TestFastInputStream extends LuceneTestCase {
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testgzip() throws Exception {
ByteArrayOutputStream b = new ByteArrayOutputStream();
FastOutputStream fos = new FastOutputStream(b);

View File

@ -20,6 +20,7 @@ import org.apache.lucene.util.LuceneTestCase;
import org.apache.solr.BaseDistributedSearchTestCase;
import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrDocumentList;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
import java.io.ByteArrayInputStream;
@ -30,6 +31,8 @@ import java.util.Map;
import java.util.HashMap;
public class TestNamedListCodec extends LuceneTestCase {
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testSimple() throws Exception{
NamedList nl = new NamedList();
@ -92,6 +95,8 @@ public class TestNamedListCodec extends LuceneTestCase {
assertEquals(101, ((List)list.get(1).getFieldValue("f")).get(1));
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testIterator() throws Exception{
NamedList nl = new NamedList();
@ -131,6 +136,8 @@ public class TestNamedListCodec extends LuceneTestCase {
assertEquals(list.size(), l.size());
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testIterable() throws Exception {
@ -245,8 +252,8 @@ public class TestNamedListCodec extends LuceneTestCase {
}
}
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
public void testRandom() throws Exception {
// Random r = random;
// let's keep it deterministic since just the wrong