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

Web url based resource links bring to test failure #151

Closed
akryvtsun opened this issue Jun 16, 2017 · 7 comments
Closed

Web url based resource links bring to test failure #151

akryvtsun opened this issue Jun 16, 2017 · 7 comments
Labels

Comments

@akryvtsun
Copy link
Contributor

If network environment is restricted or development is going on offline then some tests are failed.
E.g. such links

new UrlAsInput(
    "https://raw.githubusercontent.com/yegor256/cactoos/0.5/pom.xml"
)

have to be changed to local files with "file:///<relative path here>/pom.xml"

@0crat
Copy link
Collaborator

0crat commented Jun 16, 2017

@Englishman I'm not managing this repo, remove the webhook or contact me in Slack //cc @yegor256

@yegor256
Copy link
Owner

@Englishman indeed it's a bug, thanks.

@yegor256 yegor256 added the bug label Jun 16, 2017
@akryvtsun
Copy link
Contributor Author

Will take care of it

@yegor256
Copy link
Owner

@Englishman I would not change them to file://... It's important to have real tests that actually go to real URLs. In order to see how we behave with content that is not available immediately, but takes some time to read. I would rather add some gate keepers in front of the tests, which will check whether we're online now or not. But I'm not sure... :)

@akryvtsun
Copy link
Contributor Author

Set of broken tests
6-16-2017 11-04-06 am

@akryvtsun
Copy link
Contributor Author

@yegor256

It's important to have real tests that actually go to real URLs.

Even with file://... it'll go through real URL java class. And we don't want to test it behavior.

In order to see how we behave with content that is not available immediately, but takes some time to read.

Honestly, I can't see any reason for this testing primitive utility classes. But if you see, please, explain.

But I'm not sure... :)

Will provide file://... bases fix and if we really need slow org.cactoos.Input implementation we'll create it for such testing purposes later.

@akryvtsun
Copy link
Contributor Author

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants