diff --git a/integration-tests/application_tests/appUtility_test.go b/integration-tests/application_tests/appUtility_test.go index 5625cf980416f6b7f84acdb48b0d3bec619ca737..ec4dc3d035094203bfce00452b630e715c994ea2 100644 --- a/integration-tests/application_tests/appUtility_test.go +++ b/integration-tests/application_tests/appUtility_test.go @@ -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) diff --git a/integration-tests/application_tests/application_test.go b/integration-tests/application_tests/application_test.go index 1c5855d1bd2cbfbb4b143c338ac2b52ca96534d2..6b1d58ed419ca6f57fe74bdca7bfb8ec3cd054c5 100644 --- a/integration-tests/application_tests/application_test.go +++ b/integration-tests/application_tests/application_test.go @@ -59,8 +59,8 @@ func TestMain(m *testing.M) { fmt.Println(err.Error()) } - // integration_test_utils.ApplySDNConfig(conn, ctx, defaultSDNConfig) - // integration_test_utils.CleanUserAndRolesExceptAdmin(conn, ctx) + defer integration_test_utils.ApplySDNConfig(conn, ctx, defaultSDNConfig) + defer integration_test_utils.CleanUserAndRolesExceptAdmin(conn, ctx) topics := []event.Topic{event.ManagedNetworkElement, event.User}