-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[WIP] re-enable solr-specific tests #1409
Conversation
Then, the rest of this:
|
Generated by 🚫 Danger |
fa3e4b8
to
e5baaf8
Compare
Yay, figured out to fix the DISABLE_SOLR_CHECK (renamed) env var toggle to properly reindex in 47 minutes. |
wow, cool!
…On Wed, May 10, 2017 at 12:35 PM, Sebastian Silva ***@***.***> wrote:
Yay, figured out to fix the DISABLE_SOLR_CHECK (renamed) env var toggle to
properly reindex in 47 minutes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1409 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ1JzP9qHkEz3sZjbfqXm7W6OHIIrks5r4edqgaJpZM4NWvJ2>
.
|
So it works: |
This is the result of running solr tests in travis:
|
af44c53
to
5994757
Compare
Huh, cool -- great work! But looks like the error at |
But i got a bunch of email notifications about not working when Solr is off -- but the comments are gone now, was that resolved? Does it now work whether Solr is on or off? |
Yes sorry - i deleted those messages - initially I accidentally double posted. Then I removed one copy. Then I looked at a different tab not knowing it and saw the duplicate message, so I deleted it, but turns out I deleted both messages. Sigh. Summarizing, yes, stopping Solr causes an error. :-/ |
Here's the error we get when Solr is off:
|
Here's another coverage tool that perhaps even is used underneath coveralls? |
adbd92f
to
9053929
Compare
|
Hmm, some green and red there, nice! BTW does Coveralls just use SimpleCov? https://travis-ci.org/publiclab/plots2/builds/231645129#L2782 says:
|
missed an |
OK, reindex failed but because: I think this is because we actually want to send it to embedded Solr, so we could just run |
Nice! Solr indexed: Trying to resolve another test failure now... |
OK, in both cases it's not returning any results:
However, OH! this is where we need htat extra parameter! |
Yay, making progress! Good work!
…On 12/05/17 16:44, Jeffrey Warren wrote:
OK, in both cases it's not returning any results:
|===============================================================================
Failure: <[]> expected to be != to <[]>.
test_should_get_search_test_action(SearchesControllerTest)
test/solr/searches_controller_test.rb:25:in `block in
<class:SearchesControllerTest>'
===============================================================================
.F
===============================================================================
Failure: <false> is not true.
test_Node.search_for_two_different_key_words_returns_different_results(SearchRecordTest)
test/solr/search_record_test.rb:54:in `block in
<class:SearchRecordTest>'
===============================================================================
|
However, |Node.search| does return results, so maybe we should just
echo those out to be ...
OH! this is where we need htat extra parameter!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1409 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMMS5UY9vEhnidO7HgeWuNTRU7p5wvBks5r5NKhgaJpZM4NWvJ2>.
|
test/solr/search_record_test.rb
Outdated
@@ -59,6 +59,8 @@ class SearchRecordTest < ActiveSupport::TestCase | |||
#with(:updated_month, month) if month.present? | |||
#paginate :page => 1, :per_page => 10 | |||
end | |||
puts solr_search_1.results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, i have to wrap up for the day, but my attempt to output the results here didn't turn into anything. We could try puts solr_search_1.results.inspect
instead...?
Some hints on coveralls vs. simplecov here: http://technology.indiegogo.com/tag/simplecov/ -- though we should maybe just break out a separate issue. |
OK, after today's work, a checklist is:
We did confirm that in the staging server, these exact queries do return results, so the Solr test failures are confusing. All are related to |
602b473
to
fe76c6f
Compare
Rebased and attempted a fix |
aha -- hmm, this time, we dropped coverage again! how/why!? |
Awesome, this worked perfectly!
We can write a wrapper for Node.search which checks this first, such as Node.search_if_available! |
@icarito, if I add this, would you be ready to reenable Solr on production? |
GREAT! pad.publiclab.org is ready with a Solr container. |
Looking forward to put this in production. :-) |
Fingers X, i've implemented on-read toggles for all instances of |
We could test this out on Sunday if you like -- assuming nothing else comes up. I want to be very thorough about testing with Solr on and off, in staging. |
And in production actually! |
Wheeee! |
Nice, and both http://branch1.laboratoriopublico.org/ and http://branch1.laboratoriopublico.org/searches/test/test?q=About load normally -- with Solr off. I think this is ready for a merge! |
- docker-entrypoint.sh | ||
- solr-precreate | ||
- default | ||
# solr: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, just checking -- do we need to re-enable this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also any relation to #1428 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in production or staging as we're planning to deploy the solr container in pad.publiclab.org.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I'll add a separate docker-compose-production.yml for this, so we might as well reenable this here.
Do you want to make the required changes, as I'm not 100% sure I know --
and maybe add a comment accordingly inline? Then i'm ready to merge :-)
…On Wed, Jun 14, 2017 at 8:30 PM, Sebastian Silva ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In docker-compose.yml
<#1409 (comment)>:
> @@ -13,16 +13,16 @@ services:
- ../dump:/docker-entrypoint-initdb.d
# for importing a dump
# if you want to re-import simply put away ../mysql/*
- solr:
- image: solr:5.3
- ports:
- - "127.0.0.1:8984:8983"
- volumes:
- - solr:/opt/solr/server/solr/mycores
- entrypoint:
- - docker-entrypoint.sh
- - solr-precreate
- - default
+# solr:
But I'll add a separate docker-compose-production.yml for this, so we
might as well reenable this here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1409 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ2gxHbUqYxJCrd0lg-rbA3n06D89ks5sEHtBgaJpZM4NWvJ2>
.
|
It should work as-is, if I understood correctly. I'm going to be afk for the next few hours. |
Ah, so i can merge this? |
Yes, we can merge the commented version, I believe. Sunspot.yml doesn't point to the Just also add a note for the sake of thoroughness, the Solr schema creation process (which we assumed occurred during |
Ok!!! |
Oh wow that was fast I was committing the additional comment on docker-compose.yml - |
This is to replace #1386 with a branch in plots2 repository in order to enable coveralls.
rake test:all