Skip to content

Commit

Permalink
adding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RoxyFarhad committed Aug 15, 2023
1 parent fc1249a commit c73859a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rpc/wrtc_call_queue_mongodb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ import (
var activeAnswerersTrigger chan int

func init() {
activeAnswerersTrigger = make(chan int, 100)
activeAnswerersTrigger = make(chan int, 10)
}

func activeAnswerersStub(hostnames []string) {
// creates a channel to check that we are calling this function
// when we have valid answerers
// This stub is used to check whether answereres are calling this function
// because we will call this every second, we want to add a buffer into the channel
// so that it doesn't block within the test because of race conditions
activeAnswerersTrigger <- len(hostnames)
}

Expand Down Expand Up @@ -139,7 +140,6 @@ func TestMongoDBWebRTCCallQueueMulti(t *testing.T) {
t.Logf("received offer %d=%s", i, exchange.UUID())
test.That(t, err, test.ShouldBeNil)
exchanges = append(exchanges, exchange)

}

time.Sleep(2 * time.Second)
Expand Down

0 comments on commit c73859a

Please sign in to comment.