Solr
  1. Solr
  2. SOLR-4401

Move the stress test in SOLR-4196 into a junit test

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.2, 5.0
    • Fix Version/s: 4.3, 5.0
    • Component/s: None
    • Labels:
      None

      Description

      As part of SOLR-4196, I created a stress test proces for rapidly opening and closing cores. It'd probably be useful to make this into a junit test that ran nightly (it needs some time in order to show anything, as in minutes). Typical failures are 20 minutes into the run, but occasionally they're faster.

      1. SOLR-4401.patch
        27 kB
        Erick Erickson
      2. StressTest.zip
        9 kB
        Erick Erickson

        Issue Links

          Activity

          Hide
          Uwe Schindler added a comment -

          Closed after release.

          Show
          Uwe Schindler added a comment - Closed after release.
          Hide
          Commit Tag Bot added a comment -

          [branch_4x commit] Erick Erickson
          http://svn.apache.org/viewvc?view=revision&revision=1454477

          Merging code for SOLR-4196, SOLR-4401, SOLR-4525. All about obsoleting solr.xml and supporting a large number of cores

          Show
          Commit Tag Bot added a comment - [branch_4x commit] Erick Erickson http://svn.apache.org/viewvc?view=revision&revision=1454477 Merging code for SOLR-4196 , SOLR-4401 , SOLR-4525 . All about obsoleting solr.xml and supporting a large number of cores
          Hide
          Erick Erickson added a comment -

          Merged into 4x, r: 1454477

          Show
          Erick Erickson added a comment - Merged into 4x, r: 1454477
          Hide
          Commit Tag Bot added a comment -

          [trunk commit] Erick Erickson
          http://svn.apache.org/viewvc?view=revision&revision=1451998

          took out soe debugging info I left in by mistake when checking in SOLR-4401

          Show
          Commit Tag Bot added a comment - [trunk commit] Erick Erickson http://svn.apache.org/viewvc?view=revision&revision=1451998 took out soe debugging info I left in by mistake when checking in SOLR-4401
          Hide
          Erick Erickson added a comment -

          Committed trunk, r: 1451997
          Then took out some debugging junk I inadvertently left in in r: 1451998. Harmless...

          I'll fold this into 4x when I merge SOLR-4196

          Show
          Erick Erickson added a comment - Committed trunk, r: 1451997 Then took out some debugging junk I inadvertently left in in r: 1451998. Harmless... I'll fold this into 4x when I merge SOLR-4196
          Hide
          Commit Tag Bot added a comment -

          [trunk commit] Erick Erickson
          http://svn.apache.org/viewvc?view=revision&revision=1451997

          SOLR-4401 adding rapidly opening/closing cores to unit tests

          Show
          Commit Tag Bot added a comment - [trunk commit] Erick Erickson http://svn.apache.org/viewvc?view=revision&revision=1451997 SOLR-4401 adding rapidly opening/closing cores to unit tests
          Hide
          Mark Miller added a comment -

          The times seem reasonable to me. I'm not so worried about it running forever - we can always do that manually. You will still get a lot of testing out of the many different envs and the fact that those jenkins are cranking all day long. You are probably just as likely to find it cranking for 30 seconds on 20 vm's 15 timdes a day as on one machine cranking for 6 hours or whatever.

          Show
          Mark Miller added a comment - The times seem reasonable to me. I'm not so worried about it running forever - we can always do that manually. You will still get a lot of testing out of the many different envs and the fact that those jenkins are cranking all day long. You are probably just as likely to find it cranking for 30 seconds on 20 vm's 15 timdes a day as on one machine cranking for 6 hours or whatever.
          Hide
          Erick Erickson added a comment -

          I'm going to try to put this into a junit test over the weekend. It can run really long or really short. I'm thinking of providing three methods, one that runs all the time and takes 30 seconds? a minute? Label it as "slow" either way.

          A nightly that runs for 10 minutes

          A weekly that runs for an hour

          The background here is that I see issues after 1-2 hours running on my machine, occasionally as little as 30 minutes. I suppose if it runs more often it'd have a better chance of hitting at shorter intervals. I'm open to suggestions, so let me know.... I really don't have a sense of how onerous a really long-running test would be....

          Mark:
          When I mentioned "prior art" it was mostly a shorthand to myself that there seemed to be code I could use as a model in TestReplicationHandler in terms of starting up servers and all that rot. But I'll look at JettySolrRunner as you indicated, thanks for the pointer.

          Show
          Erick Erickson added a comment - I'm going to try to put this into a junit test over the weekend. It can run really long or really short. I'm thinking of providing three methods, one that runs all the time and takes 30 seconds? a minute? Label it as "slow" either way. A nightly that runs for 10 minutes A weekly that runs for an hour The background here is that I see issues after 1-2 hours running on my machine, occasionally as little as 30 minutes. I suppose if it runs more often it'd have a better chance of hitting at shorter intervals. I'm open to suggestions, so let me know.... I really don't have a sense of how onerous a really long-running test would be.... Mark: When I mentioned "prior art" it was mostly a shorthand to myself that there seemed to be code I could use as a model in TestReplicationHandler in terms of starting up servers and all that rot. But I'll look at JettySolrRunner as you indicated, thanks for the pointer.
          Hide
          Mark Miller added a comment -

          Also, I'd probably take the config files out of the src - and either preferably use an existing test config or add a new one.

          Show
          Mark Miller added a comment - Also, I'd probably take the config files out of the src - and either preferably use an existing test config or add a new one.
          Hide
          Mark Miller added a comment -

          prior art in TestReplicationHandler?

          Not specifically I don't think, but it's probably an option - lot's of prior art to go around that should fit this.

          I think largely you can keep the machinery as it is. You probably want to use JettySolrRunner to take the place of starting up Solr (currently a user action). Extend SolrTestCase4j but don't call initCore. Then the tmp directory should be chosen in a manner similar to other tests. Then add some asserts, some polish, and I think it may be a fairly easy job.

          • Also, tag as nightly? Weekly?

          I think it should actually be run frequently for short intervals - like 30 seconds - and then long runs more like nightly or weekly.

          Show
          Mark Miller added a comment - prior art in TestReplicationHandler? Not specifically I don't think, but it's probably an option - lot's of prior art to go around that should fit this. I think largely you can keep the machinery as it is. You probably want to use JettySolrRunner to take the place of starting up Solr (currently a user action). Extend SolrTestCase4j but don't call initCore. Then the tmp directory should be chosen in a manner similar to other tests. Then add some asserts, some polish, and I think it may be a fairly easy job. Also, tag as nightly? Weekly? I think it should actually be run frequently for short intervals - like 30 seconds - and then long runs more like nightly or weekly.
          Hide
          Erick Erickson added a comment -

          Stand-alone test harness.

          prior art in TestReplicationHandler?

          Also, tag as nightly? Weekly?

          Show
          Erick Erickson added a comment - Stand-alone test harness. prior art in TestReplicationHandler? Also, tag as nightly? Weekly?

            People

            • Assignee:
              Erick Erickson
              Reporter:
              Erick Erickson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development