lveraszto commented on PR #17586:
URL: https://github.com/apache/beam/pull/17586#issuecomment-1278698195

   Hi,
   
   thanks for the commit.
   
   I found a little thing.
   I had a custom matcher inherited from `PubSubMessageMatcher`. 
   I used in my class the `_wait_for_messages` function to get the message and 
decode it for comparison.
   But my converter throws an error because the messages are now a tuple not a 
single list.
   
   My old code:
   `// store the messages as a local variable in my custom class`
   `self.messages = self._wait_for_messages(self.expected_msg_len, 
self.timeout)`
   
   and
   
   `// convert the messages for comparison`
   `def __convert_message(self, messages):
           return list(map(lambda x: json.loads(x.decode("utf-8")), messages))`
           
   The error: `AttributeError: 'list' object has no attribute 'decode'`
   
   My fix:
   `self.messages = self._wait_for_messages(self.expected_msg_len, 
self.timeout)[0]`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to