betfair / cougar

Cougar is a framework for making building network exposed service interfaces easy.
http://betfair.github.io/cougar
Apache License 2.0
27 stars 18 forks source link

Bug in the generated client code regarding TimeConstraints #84

Closed andredasilvapinto closed 9 years ago

andredasilvapinto commented 9 years ago

The timeout to TimeConstraint conversion is not considering the case of no timeout (timeout == 0) for the AsyncClient.

cougar-codegen-plugin/templates/client-impl.ftl DefaultTimeConstraints.fromTimeout(timeoutMillis)

This effectively transforms a "no timeout" to a "timeout now" operation.

My suggestion (contained on the referenced pull request) would be not to add the same logic as we have on /templates/clientSyncServiceImpl.ftl, but instead extract it to to a centralized point inside the fromTimeout static method.

eswdd commented 9 years ago

We need to expand integration tests so that this would have been caught

eswdd commented 9 years ago

Will expand tests in trunk under #91