Comments (28)
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.
what part don't you understand?
please don't close the issue until tests pass
from iron_worker_ruby_ng.
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.
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.
https://github.com/iron-io/iron_worker_ruby_ng/blob/master/test/test_cli.rb
this one is
from iron_worker_ruby_ng.
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.
https://github.com/iron-io/iron_worker_ruby_ng/blob/master/test/test_cli.rb#L38
from iron_worker_ruby_ng.
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.
I do not want to read regexps especially when they are not needed.
from iron_worker_ruby_ng.
/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.
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.
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.
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.
@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.
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.
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.
@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.
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.
https://github.com/iron-io/iron_worker_ruby_ng/blob/master/test/test_batch.rb
from iron_worker_ruby_ng.
@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.
personally I run
remote_test.rb EXCLP=batch
to run tests remotely, without test_batch
it takes ~3min
from iron_worker_ruby_ng.
- 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.
- EXCLP isn't documented anywhere and i wasn't really aware about it. also, it got bad cryptic name :)
- 3 mins is way too much anyway.
from iron_worker_ruby_ng.
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.
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.
do I get it right?
- you refuse to mind the tests
- you have your own hidden non-automated test suite
from iron_worker_ruby_ng.
- 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.
- 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.
they pass now.
from iron_worker_ruby_ng.
Related Issues (20)
- Update docs as in this pull request
- Could not find a valid gem 'iron_worker_ng' HOT 1
- remote build failing HOT 1
- Rubyzip version freeze
- document how to run the tests
- Remote Build Failing - mime-types dependency HOT 15
- cannot access params HOT 3
- bundler version
- bundle error for iron_worker_ng 1.0.4 HOT 4
- Rest::HttpError while running worker (typhoeus_wrapper) HOT 7
- handle_response curl error with iron_worker_ng 1.4.1 HOT 7
- Treat Symlinks as files for uploading HOT 2
- Support bulk task queuing
- Upgrade to RubyZip 1.1.0 to resolve installation problems with newer gems. HOT 4
- Add multiple sources when merging ruby dependencies
- params parser failed on specific payload
- Follow links on disk when uploading node_modules
- error using CLI tool to upload java worker (HTTP 404) HOT 1
- Error while uploading Worker files with gems HOT 5
- This needs to be re created for v3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iron_worker_ruby_ng.