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

JobTest only works with ContextAndArgs #114

Closed
nollbit opened this issue Apr 27, 2016 · 3 comments
Closed

JobTest only works with ContextAndArgs #114

nollbit opened this issue Apr 27, 2016 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@nollbit
Copy link

nollbit commented Apr 27, 2016

It seems like testing with JobTest only works if the context in the tested class is created using ContextAndArgs (testId properly set in https://github.com/spotify/scio/blob/master/scio-core/src/main/scala/com/spotify/scio/ScioContext.scala#L59-L65)

If it's using any of the ScioContext.apply() initializers testId will always be None and the tests won't work (testId always None in https://github.com/spotify/scio/blob/master/scio-core/src/main/scala/com/spotify/scio/ScioContext.scala#L73-L83)

Is this by design or would you accept a PR to fix it?

@nevillelyh nevillelyh added the bug Something isn't working label Apr 27, 2016
@nevillelyh
Copy link
Contributor

nevillelyh commented Apr 27, 2016

It's a case we haven't thought about yet. What do you propose? Adding an optional testId arg to every apply() method?

@nevillelyh
Copy link
Contributor

nevillelyh commented May 11, 2016

@nollbit any thoughts?

nevillelyh added a commit that referenced this issue Jun 21, 2016
nevillelyh added a commit that referenced this issue Jun 22, 2016
nevillelyh added a commit that referenced this issue Jun 22, 2016
@nevillelyh
Copy link
Contributor

Fixed in #174

@nevillelyh nevillelyh self-assigned this Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants