Solr
  1. Solr
  2. SOLR-8489

TestMiniSolrCloudCluster.createCollection to support extra & alternative collectionProperties

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      • add optional collectionProperties map arg and use putIfAbsent instead of put with the map
      • move persistIndex i.e. solr.directoryFactory randomisation from the several callers to just-once in createCollection

      These changes are refactors only and intended to not change the existing tests' behaviour.

      1. SOLR-8489.patch
        5 kB
        Christine Poerschke

        Issue Links

          Activity

          Hide
          ASF subversion and git services added a comment -

          Commit 1723162 from Christine Poerschke in branch 'dev/trunk'
          [ https://svn.apache.org/r1723162 ]

          SOLR-8489: TestMiniSolrCloudCluster.createCollection to support extra & alternative collectionProperties

          Show
          ASF subversion and git services added a comment - Commit 1723162 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1723162 ] SOLR-8489 : TestMiniSolrCloudCluster.createCollection to support extra & alternative collectionProperties
          Hide
          ASF subversion and git services added a comment -

          Commit 1723170 from Christine Poerschke in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1723170 ]

          SOLR-8489: TestMiniSolrCloudCluster.createCollection to support extra & alternative collectionProperties (merge in revision 1723162 from trunk)

          Show
          ASF subversion and git services added a comment - Commit 1723170 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1723170 ] SOLR-8489 : TestMiniSolrCloudCluster.createCollection to support extra & alternative collectionProperties (merge in revision 1723162 from trunk)
          Hide
          Steve Rowe added a comment -

          Compilation on branch_5x is failing while compiling TestMiniSolrCloudCluster.java. See e.g. https://builds.apache.org/job/Lucene-Solr-Maven-5.x/1152/.

          ant compile-test fails for me - Map.putIfAbsent() was added in Java8:

          common.compile-test:
              [javac] Compiling 7 source files to /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/build/solr-core/classes/test
              [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:103: error: cannot find symbol
              [javac]     collectionProperties.putIfAbsent(CoreDescriptor.CORE_CONFIG, "solrconfig-tlog.xml");
              [javac]                         ^
              [javac]   symbol:   method putIfAbsent(String,String)
              [javac]   location: variable collectionProperties of type Map<String,String>
              [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:104: error: cannot find symbol
              [javac]     collectionProperties.putIfAbsent("solr.tests.maxBufferedDocs", "100000");
              [javac]                         ^
              [javac]   symbol:   method putIfAbsent(String,String)
              [javac]   location: variable collectionProperties of type Map<String,String>
              [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:105: error: cannot find symbol
              [javac]     collectionProperties.putIfAbsent("solr.tests.ramBufferSizeMB", "100");
              [javac]                         ^
              [javac]   symbol:   method putIfAbsent(String,String)
              [javac]   location: variable collectionProperties of type Map<String,String>
              [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:107: error: cannot find symbol
              [javac]     collectionProperties.putIfAbsent("solr.tests.mergePolicy", "org.apache.lucene.index.TieredMergePolicy");
              [javac]                         ^
              [javac]   symbol:   method putIfAbsent(String,String)
              [javac]   location: variable collectionProperties of type Map<String,String>
              [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:108: error: cannot find symbol
              [javac]     collectionProperties.putIfAbsent("solr.tests.mergeScheduler", "org.apache.lucene.index.ConcurrentMergeScheduler");
              [javac]                         ^
              [javac]   symbol:   method putIfAbsent(String,String)
              [javac]   location: variable collectionProperties of type Map<String,String>
              [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:109: error: cannot find symbol
              [javac]     collectionProperties.putIfAbsent("solr.directoryFactory", (persistIndex ? "solr.StandardDirectoryFactory" : "solr.RAMDirectoryFactory"));
              [javac]                         ^
              [javac]   symbol:   method putIfAbsent(String,String)
              [javac]   location: variable collectionProperties of type Map<String,String>
              [javac] Note: /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java uses unchecked or unsafe operations.
              [javac] Note: Recompile with -Xlint:unchecked for details.
              [javac] 6 errors
          
          Show
          Steve Rowe added a comment - Compilation on branch_5x is failing while compiling TestMiniSolrCloudCluster.java . See e.g. https://builds.apache.org/job/Lucene-Solr-Maven-5.x/1152/ . ant compile-test fails for me - Map.putIfAbsent() was added in Java8: common.compile-test: [javac] Compiling 7 source files to /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/build/solr-core/classes/test [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:103: error: cannot find symbol [javac] collectionProperties.putIfAbsent(CoreDescriptor.CORE_CONFIG, "solrconfig-tlog.xml"); [javac] ^ [javac] symbol: method putIfAbsent(String,String) [javac] location: variable collectionProperties of type Map<String,String> [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:104: error: cannot find symbol [javac] collectionProperties.putIfAbsent("solr.tests.maxBufferedDocs", "100000"); [javac] ^ [javac] symbol: method putIfAbsent(String,String) [javac] location: variable collectionProperties of type Map<String,String> [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:105: error: cannot find symbol [javac] collectionProperties.putIfAbsent("solr.tests.ramBufferSizeMB", "100"); [javac] ^ [javac] symbol: method putIfAbsent(String,String) [javac] location: variable collectionProperties of type Map<String,String> [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:107: error: cannot find symbol [javac] collectionProperties.putIfAbsent("solr.tests.mergePolicy", "org.apache.lucene.index.TieredMergePolicy"); [javac] ^ [javac] symbol: method putIfAbsent(String,String) [javac] location: variable collectionProperties of type Map<String,String> [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:108: error: cannot find symbol [javac] collectionProperties.putIfAbsent("solr.tests.mergeScheduler", "org.apache.lucene.index.ConcurrentMergeScheduler"); [javac] ^ [javac] symbol: method putIfAbsent(String,String) [javac] location: variable collectionProperties of type Map<String,String> [javac] /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java:109: error: cannot find symbol [javac] collectionProperties.putIfAbsent("solr.directoryFactory", (persistIndex ? "solr.StandardDirectoryFactory" : "solr.RAMDirectoryFactory")); [javac] ^ [javac] symbol: method putIfAbsent(String,String) [javac] location: variable collectionProperties of type Map<String,String> [javac] Note: /Users/sarowe/svn/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java uses unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 6 errors
          Hide
          Christine Poerschke added a comment -

          Oops. Thanks for the "Map.putIfAbsent() was added in Java8" pointer. Will change TestMiniSolrCloudCluster.java branch_5x code to avoid putIfAbsent then.

          Show
          Christine Poerschke added a comment - Oops. Thanks for the " Map.putIfAbsent() was added in Java8" pointer. Will change TestMiniSolrCloudCluster.java branch_5x code to avoid putIfAbsent then.
          Hide
          ASF subversion and git services added a comment -

          Commit 1723364 from shalin@apache.org in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1723364 ]

          SOLR-8489: Fix java7 compilation errors

          Show
          ASF subversion and git services added a comment - Commit 1723364 from shalin@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1723364 ] SOLR-8489 : Fix java7 compilation errors
          Hide
          Christine Poerschke added a comment -

          Thanks Shalin Shekhar Mangar! (Myself only just now got around to this, sorry.)

          Show
          Christine Poerschke added a comment - Thanks Shalin Shekhar Mangar ! (Myself only just now got around to this, sorry.)

            People

            • Assignee:
              Christine Poerschke
              Reporter:
              Christine Poerschke
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development