Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Followup to Solr integration -- installation steps #832

Closed
5 of 7 tasks
jywarren opened this issue Sep 21, 2016 · 21 comments
Closed
5 of 7 tasks

Followup to Solr integration -- installation steps #832

jywarren opened this issue Sep 21, 2016 · 21 comments
Labels
high-priority Ruby testing issues are usually for adding unit tests, integration tests or any other tests for a feature

Comments

@jywarren
Copy link
Member

jywarren commented Sep 21, 2016

Solr is now a requirement to run tests, which may increase barriers for newcomers. I'd like to take some steps to make this process easier:

@jywarren jywarren added high-priority testing issues are usually for adding unit tests, integration tests or any other tests for a feature Ruby labels Sep 21, 2016
@icarito
Copy link
Member

icarito commented Sep 22, 2016

I did not find the duplicate rake db:setup but it would be best to join both apt-get commands and drop the icedtea7-plugin which is not required

@jywarren
Copy link
Member Author

ah, i already removed it and tested it, thanks -- maybe it resulted during
a rebase conflict. Oh, and somehow I didn't realize the icedtea7 plugin
wasn't required... must've mistakenly used that from a Stack Overflow
example. We should remove it from the Docker setup but also from the README
(i just updated that as well).

On Thu, Sep 22, 2016 at 3:37 PM, Sebastian Silva notifications@github.com
wrote:

I did not find the duplicate rake db:setup but it would be best to join
both apt-get commands and drop the icedtea7-plugin which is not required


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#832 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ5sanlNRuajQ9DQ7Lm63PJ2JQ-F0ks5qstj3gaJpZM4KC3zw
.

@jywarren
Copy link
Member Author

In development mode, I'm getting:

Error:     {msg=SolrCore 'development' is not available due to init failure: Index locked for write for core 'development'. Solr now longer supports forceful unlocking via 'unlockOnStartup'. Please verify locks manually!,trace=org.apache.solr.common.SolrException: SolrCore 'development' is not available due to init failure: Index locked for write for core 'development'. Solr now longer supports forceful unlocking via 'unlockOnStartup'. Please verify locks manually!

I think this could be due to having started a second Solr instance for development, on top of the one I'm running for testing. This could be a common gotcha which we could build into the rake tasks...

@jywarren
Copy link
Member Author

Yes -- that seems to have been the error -- and I had to shut both solr instances down and start up the right one before it worked.

@ananyo2012
Copy link
Member

Ok seeing the discussion here the icedtea-7-plugin isn't required. But I am getting the same error as Jeff mentioned in the previous comment.

@ananyo2012
Copy link
Member

Ah thanks Jeff! Sorry I didn't follow this before. I was having the same problem. Tests are running smoothly now. I think we should add this to the readme.

This was referenced Sep 27, 2016
@ananyo2012
Copy link
Member

@jywarren Should I remove the icedtea-7-plugin from the Dockerfile and Readme and update the readme with the test case as well?

@jywarren
Copy link
Member Author

Yes please!

@ananyo2012
Copy link
Member

Removed icedtea-7-plugin and updated the readme in #846

@jywarren
Copy link
Member Author

Thanks!!!!

On Tue, Sep 27, 2016 at 10:08 AM, Ananya Maiti notifications@github.com
wrote:

Removed icedtea-7-plugin and updated the readme in #846
#846


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#832 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ1E93VzA2BbI8Lpjz748UR8JRl3Xks5quSN7gaJpZM4KC3zw
.

@ananyo2012
Copy link
Member

@jywarren A lot of new contributors have come up in recently and they are facing problems in working up with the cloud9 installation. I can work on the cloud9 installation issues and building the rake tasks if you insist Jeff!

@ananyo2012
Copy link
Member

@jywarren I was thinking if could somehow start and stop the solr server along with the rails server it would be great. Basically what we have to do is find a way to run a rake task while starting a stopping the rails server.

@ananyo2012
Copy link
Member

@jywarren I am a bit stuck on this. Is there any way to find whether the solr server is already running? We have to put a condition to start the solr server in the test environment only if it is not already running. Otherwise rake is aborted due to the already running solr server. Similarly we need to stop the solr server in development only if it is running.

@jywarren
Copy link
Member Author

jywarren commented Oct 1, 2016

Hmm, i'm not sure -- doing some searches for "detect solr running" -- but perhaps while you work on this, I could -- in parallel -- see if it's possible to skip Solr dependent tests and have a rake test:nosolr task for that.

@jywarren
Copy link
Member Author

jywarren commented Oct 1, 2016

Unit tests may be omitted: http://stackoverflow.com/questions/2927405/how-to-skip-certain-tests-with-testunit#2940755

Looking for same with functional tests.

@jywarren
Copy link
Member Author

jywarren commented Oct 1, 2016

This is saying that you could just ping the solr service via wget, for example...

This is saying that you can check /admin/ping using wget. I mean, this'd assume that the client has wget to use rake, so that doesn't seem ideal...

@jywarren
Copy link
Member Author

jywarren commented Oct 1, 2016

Alternatively, we could actually move the Solr tests in searches_controller_test.rb into /test/solr/, and run them with a separate rake test:solr command -- based on this way of running a single test:

ruby -I test test/functional/whatevertest.rb

@jywarren
Copy link
Member Author

jywarren commented Oct 2, 2016

Notes:

@jywarren
Copy link
Member Author

jywarren commented Oct 2, 2016

Whoa, i think setting disabled:true in sunspot.yml works -- i moved the searches_controller_test into its own folder, and will try to trigger that one with its own rake test:sunspot

@jywarren
Copy link
Member Author

jywarren commented Oct 2, 2016

Got some more help here: http://flavio.castelli.name/2010/05/28/rails_execute_single_test/

Opened #861 which moves solr-dependent tests into a managed rake test:solr task, and adds it to the set run in rake test:all but not in rake test

@jywarren
Copy link
Member Author

@icarito - is it possible to cache the java install, as that's failing in TravisCI pretty often. Although perhaps we should add priority to the plan to separate the Solr components into a separate docker instance, or use a pre-loaded one or something? I'm not familiar with how that works but could add it to this to-do list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high-priority Ruby testing issues are usually for adding unit tests, integration tests or any other tests for a feature
Projects
None yet
Development

No branches or pull requests

3 participants