Skip to content
Snippets Groups Projects

Resolve "Implement integration tests for applications"

Merged Fabian Seidl requested to merge 347-implement-integration-tests-for-applications into master
2 files
+ 5
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -6,6 +6,7 @@ import (
"os/signal"
"strings"
"syscall"
"time"
"code.fbi.h-da.de/danet/gosdn/application-framework/event"
"code.fbi.h-da.de/danet/gosdn/application-framework/registration"
@@ -47,7 +48,7 @@ func NewApplication(ctx context.Context, grpcClientConn *grpc.ClientConn, contro
eventService: eventService,
stopChannel: make(chan os.Signal, 1),
grpcClientConn: grpcClientConn,
eventChannel: make(chan event.Event, 100),
eventChannel: make(chan event.Event, 1),
}
}
@@ -55,6 +56,7 @@ func NewApplication(ctx context.Context, grpcClientConn *grpc.ClientConn, contro
func (a *Application) Run(eventTypeCallbackTuples []event.TypeToCallbackTuple) {
signal.Notify(a.stopChannel, os.Interrupt, syscall.SIGTERM)
time.Sleep(5 * time.Second)
a.eventService.SubscribeToEventType(eventTypeCallbackTuples)
a.eventService.SetupEventReciever(a.stopChannel)
Loading