Skip to content

Commit

Permalink
Notify Runner with concept start and end
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Nestorow <[email protected]>
  • Loading branch information
PiotrNestor committed Feb 6, 2024
1 parent 6475093 commit 070b1f0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions execution/scenarioExecutor.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,14 @@ func (e *scenarioExecutor) notifyBeforeConcept(conceptResult *result.ScenarioRes
message := &gauge_messages.Message{MessageType: gauge_messages.Message_ConceptExecutionStarting,
ConceptExecutionStartingRequest: &gauge_messages.ConceptExecutionStartingRequest{CurrentExecutionInfo: e.currentExecutionInfo, Stream: int32(e.stream)}}
e.pluginHandler.NotifyPlugins(message)
e.runner.ExecuteMessageWithTimeout(message)
}

func (e *scenarioExecutor) notifyAfterConcept(conceptResult *result.ScenarioResult) {
message := &gauge_messages.Message{MessageType: gauge_messages.Message_ConceptExecutionEnding,
ConceptExecutionEndingRequest: &gauge_messages.ConceptExecutionEndingRequest{CurrentExecutionInfo: e.currentExecutionInfo, Stream: int32(e.stream)}}
e.pluginHandler.NotifyPlugins(message)
e.runner.ExecuteMessageWithTimeout(message)
}

func (e *scenarioExecutor) createStepRequest(protoStep *gauge_messages.ProtoStep) *gauge_messages.ExecuteStepRequest {
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/getgauge/gauge

go 1.21
go 1.21.0

require (
github.com/apoorvam/goterminal v0.0.0-20180523175556-614d345c47e5
Expand Down Expand Up @@ -40,3 +40,5 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/getgauge/gauge-proto/go/gauge_messages => ../gauge-proto/go/gauge_messages
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/getgauge/common v0.0.0-20231026143554-1599dddc7f01 h1:YS9Wlu7GKlfQcPzs1tTQ30nsjeAdJeJUqQq+j35YpVo=
github.com/getgauge/common v0.0.0-20231026143554-1599dddc7f01/go.mod h1:p/Q0+qO2bLq08PuxaHrxIgkvKlGGYHyXad33+zKIiXU=
github.com/getgauge/gauge-proto/go/gauge_messages v0.0.0-20240122132601-bb92eb77d703 h1:ZFK55KGnHAFpwk4YbQsp8r1ybf76MQcEVba5V21qB7w=
github.com/getgauge/gauge-proto/go/gauge_messages v0.0.0-20240122132601-bb92eb77d703/go.mod h1:grwwUhEUaDZHOj11RDIk5w7tciDv3fYDXeyYoL2BgGc=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
Expand Down
6 changes: 6 additions & 0 deletions runner/grpcRunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ func (r *GrpcRunner) invokeServiceFor(message *gm.Message) (*gm.Message, error)
case gm.Message_KillProcessRequest:
_, _ = r.RunnerClient.Kill(context.Background(), message.KillProcessRequest)
return nil, nil
case gm.Message_ConceptExecutionStarting:
_, err := r.RunnerClient.NotifyConceptExecutionStarting(context.Background(), message.ConceptExecutionStartingRequest)
return nil, err
case gm.Message_ConceptExecutionEnding:
_, err := r.RunnerClient.NotifyConceptExecutionEnding(context.Background(), message.ConceptExecutionEndingRequest)
return nil, err
default:
return nil, nil
}
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// CurrentGaugeVersion represents the current version of Gauge
var CurrentGaugeVersion = &Version{1, 6, 1}
var CurrentGaugeVersion = &Version{1, 6, 2}

// BuildMetadata represents build information of current release (e.g, nightly build information)
var BuildMetadata = ""
Expand Down

0 comments on commit 070b1f0

Please sign in to comment.