[ 
https://issues.apache.org/jira/browse/SOLR-3884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463034#comment-13463034
 ] 

Steven Rowe edited comment on SOLR-3884 at 9/26/12 4:55 AM:
------------------------------------------------------------

{quote}
Hmm.. talking with sarowe on IRC, i think there may be a bug in his patch ... 
he cloned the unpackDir he passes to testSolrExample, but i don't think 
testSolrExample actaully uses that unpack dir for anything, it appears to just 
run the example relative the CWD.
{quote}

Yup, buggy patch, I didn't chdir to the unpacked copy, so it was still sharing 
the original dir between the two runs.  Here's the hopefully fixed patch:

*edit* {{chdir}} -> {{os.chdir}}

{noformat}
Index: dev-tools/scripts/smokeTestRelease.py
===================================================================
--- dev-tools/scripts/smokeTestRelease.py       (revision 1389823)
+++ dev-tools/scripts/smokeTestRelease.py       (working copy)
@@ -533,12 +536,26 @@
     if project == 'lucene':
       testDemo(isSrc, version)
     else:
+      print('    copying unpacked distribution...')
+      java6UnpackPath = '%s-java6' %unpackPath
+      if os.path.exists(java6UnpackPath):
+        shutil.rmtree(java6UnpackPath)
+      shutil.copytree(unpackPath, java6UnpackPath)
+      os.chdir(java6UnpackPath)
       print('    test solr example w/ Java 6...')
-      testSolrExample(unpackPath, JAVA6_HOME, False)
+      testSolrExample(java6UnpackPath, JAVA6_HOME, False)
 
+      print('    copying unpacked distribution...')
+      java7UnpackPath = '%s-java7' %unpackPath
+      if os.path.exists(java7UnpackPath):
+        shutil.rmtree(java7UnpackPath)
+      shutil.copytree(unpackPath, java7UnpackPath)
+      os.chdir(java7UnpackPath)
       print('    test solr example w/ Java 7...')
-      testSolrExample(unpackPath, JAVA7_HOME, False)
+      testSolrExample(java7UnpackPath, JAVA7_HOME, False)
 
+      os.chdir(unpackPath)
+
   testChangesText('.', version, project)
{noformat}
                
      was (Author: steve_rowe):
    {quote}
Hmm.. talking with sarowe on IRC, i think there may be a bug in his patch ... 
he cloned the unpackDir he passes to testSolrExample, but i don't think 
testSolrExample actaully uses that unpack dir for anything, it appears to just 
run the example relative the CWD.
{quote}

Yup, buggy patch, I didn't chdir to the unpacked copy, so it was still sharing 
the original dir between the two runs.  Here's the hopefully fixed patch:

{noformat}
Index: dev-tools/scripts/smokeTestRelease.py
===================================================================
--- dev-tools/scripts/smokeTestRelease.py       (revision 1389823)
+++ dev-tools/scripts/smokeTestRelease.py       (working copy)
@@ -533,12 +536,26 @@
     if project == 'lucene':
       testDemo(isSrc, version)
     else:
+      print('    copying unpacked distribution...')
+      java6UnpackPath = '%s-java6' %unpackPath
+      if os.path.exists(java6UnpackPath):
+        shutil.rmtree(java6UnpackPath)
+      shutil.copytree(unpackPath, java6UnpackPath)
+      chdir(java6UnpackPath)
       print('    test solr example w/ Java 6...')
-      testSolrExample(unpackPath, JAVA6_HOME, False)
+      testSolrExample(java6UnpackPath, JAVA6_HOME, False)
 
+      print('    copying unpacked distribution...')
+      java7UnpackPath = '%s-java7' %unpackPath
+      if os.path.exists(java7UnpackPath):
+        shutil.rmtree(java7UnpackPath)
+      shutil.copytree(unpackPath, java7UnpackPath)
+      chdir(java7UnpackPath)
       print('    test solr example w/ Java 7...')
-      testSolrExample(unpackPath, JAVA7_HOME, False)
+      testSolrExample(java7UnpackPath, JAVA7_HOME, False)
 
+      chdir(unpackPath)
+
   testChangesText('.', version, project)
{noformat}
                  
> possible bug in how commits are handled during "recovery" mode on startup?
> --------------------------------------------------------------------------
>
>                 Key: SOLR-3884
>                 URL: https://issues.apache.org/jira/browse/SOLR-3884
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
>         Attachments: java6.solr-example.log, java7.solr-example.log, 
> solr-example.log
>
>
> while testing out 4.0-rc0, sarowe noted the he was seeing the smoke tester 
> script fail while sanity checking the solr example.
> https://mail-archives.apache.org/mod_mbox/lucene-dev/201209.mbox/%3c6c78e97c707b5b4c8cc61d44f87545863ed...@suex10-mbx-03.ad.syr.edu%3E
> I'm not certain, but looking at his logs, i think this suggests a bug in how 
> commits are handled when a newly started server is in "recovery" mode

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to