Giter Site home page Giter Site logo

tests are broken about iron_worker_ruby_ng HOT 28 CLOSED

iron-io avatar iron-io commented on July 22, 2024
tests are broken

from iron_worker_ruby_ng.

Comments (28)

iced avatar iced commented on July 22, 2024

I don't understand code in tests. Either rewrite them so they are readable or I can't fix them.

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

what part don't you understand?
please don't close the issue until tests pass

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024

all test-related code is messy and hard to read. also, most of the test doesn't test lib but underlying services.

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

ok, then this one is messy and hard to read, too: https://github.com/iron-io/iron_worker_ruby_ng/blob/master/test/test_basic.rb
could you please say since what line code becomes messy?

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024

https://github.com/iron-io/iron_worker_ruby_ng/blob/master/test/test_cli.rb

this one is

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

ok, could you please point the line?
subroutine 'cli' runs cli with provided arguments, returning cli output as result
we use it in tests to ensure that output matches corresponding patterns

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024

https://github.com/iron-io/iron_worker_ruby_ng/blob/master/test/test_cli.rb#L38

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

and what is wrong with that? run cli, ensure log matches /Queued up.*"id":"(.{24})"/ so it have queued task and output smth that looks like id, match that id and use in next call

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024

I do not want to read regexps especially when they are not needed.

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

/Queued up.*"id":"(.{24})"/ is not readable? sure?
suggest better way to get id of task ran by cli, to make https://github.com/iron-io/iron_worker_ruby_ng/blob/master/test/test_cli.rb#L41 possible

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024

Better way - remove this assert. It relies on specific msg format returned by server and has nothing to do with lib it supposed to test.

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

if I remove this assert, I'll need to remove all further asserts: they use task id I parse
I don't think /Queued up.*"id":"(.{24})"/ is cryptic enough to leave most of cli untested

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024

you only need to test that cli passed correct options to Code / Client. no need to queue even in this case.

from iron_worker_ruby_ng.

treeder avatar treeder commented on July 22, 2024

@iced can't hurt to go all the way through the process can it? Why wouldn't we do that?

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024

just because tests takes 15 to 30 mins on my local box now, so they are completely useless as I can't run them.

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

we agreed (several times) that it is ok to involve service in ng test
main arguments were

  • great complexity (sometimes impossibility) to test lib itself, without service
  • it is good thing, when bugs in service are revealed, which happened several times with ng tests

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

@iced
use https://github.com/iron-io/iron_worker_ruby_ng/blob/master/remote_test.rb
run tests at least before pushing big series of huge changes
don't just ignore tests, please

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024

I'd prefer suite which tests lib itself and does it without queuing 100 workers just to test some unknown to me thing.

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024

https://github.com/iron-io/iron_worker_ruby_ng/blob/master/test/test_batch.rb

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

@iced I'd prefer such suite, too
but main arguments were

  • great complexity (sometimes impossibility) to test lib itself, without service
  • it is good thing, when bugs in service are revealed, which happened several times with ng tests

have you read it?

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

personally I run

remote_test.rb EXCLP=batch

to run tests remotely, without test_batch
it takes ~3min

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024
  • great complexity - I can leave if whole suite will queue like 20-30 workers. not ~1000 like it does now.
  • make separate suite for service testing, not related to lib.

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024
  1. EXCLP isn't documented anywhere and i wasn't really aware about it. also, it got bad cryptic name :)
  2. 3 mins is way too much anyway.

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

do you mean you'll proceed to ignore tests?
just because of regular expressions and 3-min-too-much reason?

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024

I tried to use them and still use them before release, but I only check if not MUCH of them fails. I never was able to make suite to run with 100% asserts passed. And don't make me start on test suite needing pry gem for yet another unknown for me reason.

I have my own set of workers (like 10 of them) which I queue to check if everything works right. It takes like 20-30 seconds and tests as much as test suite itself.

from iron_worker_ruby_ng.

romand avatar romand commented on July 22, 2024

do I get it right?

  1. you refuse to mind the tests
  2. you have your own hidden non-automated test suite

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024
  1. if they run more than min or two and some of them fail for missing gem (pry, while it's installed) - I don't care much about them.
  2. it's not automated, it's just set of workers and simple sh script which runs iron_worker upload / queue / log and cats all results to file which I diff with good one.

from iron_worker_ruby_ng.

iced avatar iced commented on July 22, 2024

they pass now.

from iron_worker_ruby_ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.