-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NOISSUE - Raise code coverage in ws adapter (#242)
* Fix failed subscription handling in ws adapter Fix unsubscribing bug in ws adapter. Signed-off-by: Aleksandar Novakovic <[email protected]> * Add subscription fail and publish fail test cases Update mock implementation to receive publish error in order to support these test cases. Signed-off-by: Aleksandar Novakovic <[email protected]> * Update mainflux version to 0.2.3 Update project version and load tests version to 0.2.3. Signed-off-by: Aleksandar Novakovic <[email protected]> * Update version endpoint response format Signed-off-by: Aleksandar Novakovic <[email protected]>
- Loading branch information
1 parent
58f3c73
commit aea7db1
Showing
8 changed files
with
50 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
enablePlugins(GatlingPlugin) | ||
|
||
name := "load-test" | ||
version := "0.2.2" | ||
version := "0.2.3" | ||
|
||
scalaVersion := "2.12.4" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ws_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/mainflux/mainflux" | ||
"github.com/mainflux/mainflux/ws" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestClose(t *testing.T) { | ||
channel := ws.Channel{make(chan mainflux.RawMessage), make(chan bool)} | ||
channel.Close() | ||
_, closed := <-channel.Closed | ||
_, messagesClosed := <-channel.Messages | ||
assert.False(t, closed, "channel closed stayed open") | ||
assert.False(t, messagesClosed, "channel messages stayed open") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters