Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

test(datahandler): add assertion for couchdb test (lib-datahandler) #786

Conversation

maxhbr
Copy link
Member

@maxhbr maxhbr commented Mar 19, 2018

This reverts commit 3b90fe7 and fixes the internationalization bug.

related to #784

@maierthomas
Copy link
Contributor

I think we should remove this assertion based on the operating system error messages.
These error messages are language specific and currently we only verify/support German and English strings.
You may cant build the sw360portal if you have an OS with other language configuration.

@maxhbr maxhbr force-pushed the maxhbr/fix/fix/attachment-blackholetest-assertion branch from acd58ab to a399543 Compare March 20, 2018 10:26
@maxhbr
Copy link
Member Author

maxhbr commented Mar 20, 2018

Sure, that is a problem, one could try to get the not-localized message or add other assertions to the type of the exception.

Copy link
Contributor

@maierthomas maierthomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see my review comment

@@ -88,6 +87,7 @@ public String call() throws Exception {
} catch (ExecutionException e) {
Throwable futureException = e.getCause();
assertThat(futureException, is(notNullValue()));
assertTrue(futureException instanceof SocketTimeoutException);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add SocketException or directly use IOException

Copy link
Member Author

@maxhbr maxhbr Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to avoid IOException, since it contains less information.

SocketException occurs on your system?

Copy link
Contributor

@maierthomas maierthomas Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"No route to host (Host unreachable)" should be NoRouteToHostException which extends the SocketException class

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, now I understand. It depends on the routing of the network interface on the host, which exception gets thrown.

This reverts commit 3b90fe7.

Signed-off-by: Maximilian Huber <external.maximilian.huber2@bosch-si.com>
@maxhbr maxhbr force-pushed the maxhbr/fix/fix/attachment-blackholetest-assertion branch from 7d3b407 to 5edc183 Compare March 20, 2018 13:21
@maierthomas maierthomas merged commit 53fc3bc into sw360:master Mar 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants