You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/10/13 12:22:55 UTC

[GitHub] [solr] epugh commented on a change in pull request #346: SOLR-15693: replace magic ShardRequest purposes

epugh commented on a change in pull request #346:
URL: https://github.com/apache/solr/pull/346#discussion_r728003760



##########
File path: solr/core/src/test/org/apache/solr/handler/component/ShardRequestTest.java
##########
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.handler.component;
+
+import org.apache.solr.SolrTestCase;
+import org.junit.Test;
+
+public class ShardRequestTest extends SolrTestCase {
+
+  @Test
+  public void testDefaultPurposeIsZero() throws Exception {
+    final ShardRequest sr = new ShardRequest();
+    assertEquals(0, sr.purpose);
+  }
+
+  @Test
+  public void testPurposePrivateIsOne() throws Exception {

Review comment:
       While super explicit, is this needed?  I mean, isn't this a test of a constant?   I am not a super deep Java brain, so I may be missing the goal of this test!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org