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

In order to assert an asynchronous request I would like to extract a BLOB from the database #126

Closed
aaschmid opened this Issue Aug 11, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@aaschmid

aaschmid commented Aug 11, 2016

Hi Christoph,

thanks for this great framework. I would like to extract an asynchronous response from our BAM database (caused by a complex and unchangeable setup which does not run locally ...) . Unfortunately this is not due to the toString() call in

https://github.com/christophd/citrus/blob/master/modules/citrus-core/src/main/java/com/consol/citrus/actions/ExecuteSQLQueryAction.java#L155

Stopping at this line with a break point will give me the following:

  • column.getValue() => [60, 115, 111, 97, 1...
  • column.getValue().getClass() => class [B
  • column.getValue().toString() => [B@34552700

I know this can be dangerous as the byte[] can be huge but in my case this is unfortunately the only case (as long as the infrastructure will not change :-( )

If you need any further information, please don't hesitate to ask.

Cheers,
Andreas

@aaschmid

This comment has been minimized.

aaschmid commented Aug 11, 2016

I can even fix that by myself if you tell me how you would like to have it :-)

@christophd

This comment has been minimized.

Member

christophd commented Sep 22, 2016

It really makes no sense to store the byte array object hash string as value with its toString() representation. I have added an automatic base64 encoding so that the byte data is storable as string. You can access the data with decode base64 function for further usage.

This could lead to huge amount of data loaded to the memory, but at the moment we can not pass a data handler or input stream object to the test variables and use them later on. So we have to deal with loading the data to the memory for now.

Thanks for the suggestion

@aaschmid

This comment has been minimized.

aaschmid commented Sep 22, 2016

I have already tested your solution and it is working. Thanks for fixing.

@christophd christophd added this to the v2.6.1 milestone Sep 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment