Skip to content

Commit

Permalink
# be more permissive with the messages counter during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ddragosd committed Sep 14, 2015
1 parent fc87dbb commit 469d6b8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ Start the adapter with the `-d` flag to see all the messages published by the AP

## Developer guide

### Requirements
`zeromq` , `czmq`

On a MAC you can install them using Brew:
```bash
brew install zeromq
brew install czmq
```

To build the adaptor use:

```
Expand Down
6 changes: 4 additions & 2 deletions tests/test_published_messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ START_TEST(test_gateway_listener)
zclock_sleep(400);
zctx_interrupted = true;

// ck_assert_msg( messages_received_counter >= 10, "The consumer should have received at least 10 messages");
ck_assert_int_eq( messages_received_counter, 15 );
char s_counter[100] = "";
int expected_min_messages = 15;
sprintf(s_counter, "The consumer should have received at least [%d] messages, but got [%d]", expected_min_messages, messages_received_counter);
ck_assert_msg( messages_received_counter >= expected_min_messages, s_counter);

gw_zmq_destroy( &ctx );
ck_assert_msg(ctx == NULL, "ZMQ Context should be destroyed. ");
Expand Down

0 comments on commit 469d6b8

Please sign in to comment.