tconsole (1.1.1) runs the full test suite on start #49

Closed
jmoses opened this Issue Mar 2, 2012 · 19 comments

Comments

Projects
None yet
3 participants

jmoses commented Mar 2, 2012

Which seems odd to me, and not the behavior that was in 1.0.1

Collaborator

commondream commented Mar 2, 2012

@jmoses Can you send me the output you see when the test suite runs on startup? Thanks!

jmoses commented Mar 2, 2012

Dropped you an email with it. Note that none (well, almost none) of those tests fail when run via Rake. This was a Rails 2.3 app that was converted to 3.0, but I've been using tconsole with a few other of those with no issues.

Also when it's done loading, I do get the prompt, but I don't get tab complete, or anything. Tests will run, but the entire suite for everything.


Ah. I'm using Test::Unit still, the real one, not just the Rails wrapper around MiniTest, I bet that's the cause.

jmoses commented Mar 2, 2012

Although a co-worker (on another project) sees the same issue, and on that we are using MiniTest, and further tconsole 1.0.1 works fine for me on it. Although I'm scared to upgrade to 1.1.1 for that project now.

Collaborator

commondream commented Mar 2, 2012

Jon - it definitely won't work with Test::Unit, because TConsole is really tightly integrated with MiniTest as of 1.1 to get things like rerunning failed tests and class name based execution to work.

jmoses commented Mar 2, 2012

Yeah. I'll upgrade on the other project that I mentioned, and see what happens. I'll close this issue, and re-open if I can reproduce my coworkers experience.

@jmoses jmoses closed this Mar 2, 2012

Collaborator

commondream commented Mar 2, 2012

Thanks @jmoses. Definitely let me know if you can reproduce it with MiniTest in place and we'll figure out what's going on.

jasondew commented Mar 2, 2012

i'm the coworker :) here's the output i'm seeing. i've started reading through the code but maybe you can point me in the right direction:

jasondew@lambda ~/Projects/geezeo (fb3784_broken_threshold_alerts) $ tconsole

Welcome to tconsole (v1.1.1). Type 'help' for help or 'exit' to quit.

Loading environment...
DEPRECATION WARNING: "Rails.root/test/mocks/test" won't be added automatically to load paths anymore in future releases. (called from class:Application at /Users/jasondew/Projects/geezeo/config/application.rb:39)
Loading fast_context
DEPRECATION WARNING: subclasses is deprecated and will be removed from Rails 3.0 (use descendants instead). (called from time_sensitive_alerts at /Users/jasondew/Projects/geezeo/app/models/alert.rb:42)
Coverage report generated for Unit Tests, /Users/jasondew/.rvm/gems/ruby-1.9.2-p180@geezeo/bin/tconsole to >/Users/jasondew/Projects/geezeo/coverage. 10546 / 16638 LOC (63.39%) covered.
Run options: --seed 64645

Running tests:

...............................................................(more dots, etc elided)
Environment loaded in 382.470382s.

tconsole>

Attempting to run tests for just one class has the same effect as well:

tconsole> AlertMailer
Running tests...

Loading fast_context
(same as above)

Appreciate any pointers (p.s. you going to make it to converge this year?)

Collaborator

commondream commented Mar 2, 2012

😄 Hi Jason! I'll definitely be at Converge this year!

I think I may have found the problem. When TConsole first starts it actually loads all of your tests to prime the autocompletion. It wasn't causing tests to execute for me, but really it doesn't make sense that they weren't running, because Rails loads minitest/autorun which runs your tests when any process that loads up a test suite exits. In TConsole I actually have to patch that functionality out to keep it from happening, but wasn't on the preload. Is the issue resolved if you load up the latest prerelease - 1.1.2pre2?

@commondream commondream reopened this Mar 2, 2012

jasondew commented Mar 2, 2012

Awesome! I'll see you there then. Unfortunately the issue's still there in the latest:

Welcome to tconsole (v1.1.2pre2). Type 'help' for help or 'exit' to quit.

Loading environment...
DEPRECATION WARNING: "Rails.root/test/mocks/test" won't be added automatically to load paths anymore in future releases. (called from class:Application at /Users/jasondew/Projects/geezeo/config/application.rb:39)
Loading fast_context
DEPRECATION WARNING: subclasses is deprecated and will be removed from Rails 3.0 (use descendants instead). (called from time_sensitive_alerts at /Users/jasondew/Projects/geezeo/app/models/alert.rb:42)
Coverage report generated for Unit Tests, /Users/jasondew/.rvm/gems/ruby-1.9.2-p180@geezeo/bin/tconsole to /Users/jasondew/Projects/geezeo/coverage. 6136 / 14519 LOC (42.26%) covered.
Run options: --seed 39409

Running tests:

Really appreciate your help on this,

Collaborator

commondream commented Mar 2, 2012

BOOO!!! Can you send me your Gemfile and Gemfile.lock, just so I can make sure there's something I haven't tested out going on there. Feel free to email me at alan@commondream.net or msg me on GitHub if you don't want anyone else to see that info.

jasondew commented Mar 2, 2012

Sure thing!

jmoses commented Mar 2, 2012

This version works as expected for me, on the same projects:

/Users/jmoses/.rvm/gems/ruby-1.9.2-p290@geezeo-pfm/gems/tconsole-1.0.1pre5

Collaborator

commondream commented Mar 2, 2012

@jasondew @jmoses I noticed in your Gemfile you've got spork-testunit set up. Is it super hard to test things out without spork set up anymore? Looking through the spork-testunit code it seems pretty likely that it and TConsole are having issues with each other.

jasondew commented Mar 2, 2012

Yanked spork and spork-testunit (and the config in test/test_helper) and got the same results :/

Collaborator

commondream commented Mar 2, 2012

:/ I'm headed to take the kids to the dentist, but I'll keep digging once I get back.

On Mar 2, 2012, at 9:28 AM, Jason Dewreply@reply.github.com wrote:

Yanked spork and spork-testunit (and the config in test/test_helper) and got the same results :/


Reply to this email directly or view it on GitHub:
commondream#49 (comment)

jasondew commented Mar 2, 2012

no worries man, let me know how i can help

Collaborator

commondream commented Mar 2, 2012

@jasondew Even with a fresh 3.0.4 Rails app and your Gemfile applied I can't get this to reproduce. Is there any way you could send me a super pruned down copy of your app that reproduces the issue (or the whole thing if that's easier and it's something you'd be ok with me seeing).

@commondream don't think that would go over very well but i'll try to dig in on my side as I have a chance -- we're also in the middle of converting from test/unit to rspec :)

Collaborator

commondream commented Dec 7, 2012

Closing this out since I wasn't ever able to reproduce.

@commondream commondream closed this Dec 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment