[SEBA-916] Restored BBR and added it to the 'make test' target

Change-Id: Ifac21bae93017a680edbeff071f8574ab70a3d9b
diff --git a/internal/bbr/devices/olt.go b/internal/bbr/devices/olt.go
index 7104880..a12d8c6 100644
--- a/internal/bbr/devices/olt.go
+++ b/internal/bbr/devices/olt.go
@@ -216,7 +216,6 @@
 
 	ctx, cancel := context.WithCancel(context.TODO())
 	go onu.ProcessOnuMessages(ctx, nil, client)
-	defer cancel()
 
 	go func() {
 
@@ -227,6 +226,8 @@
 				"TargetOnus":    o.TargetOnus,
 			}).Debugf("Onu done")
 
+			// close the ONU channel
+			cancel()
 		}()
 
 		for message := range onu.DoneChannel {
diff --git a/internal/bbsim/devices/onu.go b/internal/bbsim/devices/onu.go
index 9ab83fa..51d9642 100644
--- a/internal/bbsim/devices/onu.go
+++ b/internal/bbsim/devices/onu.go
@@ -438,8 +438,8 @@
 
 	// after DiscoveryRetryDelay check if the state is the same and in case send a new OnuDiscIndication
 	go func(delay time.Duration) {
+		time.Sleep(delay)
 		if o.InternalState.Current() == "discovered" {
-			time.Sleep(delay)
 			o.sendOnuDiscIndication(msg, stream)
 		}
 	}(o.DiscoveryRetryDelay)