Fix Goroutine Leak of Environment Get
that was caused by creating an intermediate environment `fetchedEnvironment` when fetching the environments but not removing it in case that we just copy its configuration to the existing environment.
This commit is contained in:
@@ -38,7 +38,8 @@ type ExecutionEnvironment interface {
|
||||
// Register saves this environment at the executor.
|
||||
Register() error
|
||||
// Delete removes this environment and all it's runner from the executor and Poseidon itself.
|
||||
Delete() error
|
||||
// Iff local the environment is just removed from Poseidon without external escalation.
|
||||
Delete(local bool) error
|
||||
|
||||
// Sample returns and removes an arbitrary available runner.
|
||||
// ok is true iff a runner was returned.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.33.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.33.2. DO NOT EDIT.
|
||||
|
||||
package runner
|
||||
|
||||
@@ -45,13 +45,13 @@ func (_m *ExecutionEnvironmentMock) CPULimit() uint {
|
||||
return r0
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields:
|
||||
func (_m *ExecutionEnvironmentMock) Delete() error {
|
||||
ret := _m.Called()
|
||||
// Delete provides a mock function with given fields: local
|
||||
func (_m *ExecutionEnvironmentMock) Delete(local bool) error {
|
||||
ret := _m.Called(local)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func() error); ok {
|
||||
r0 = rf()
|
||||
if rf, ok := ret.Get(0).(func(bool) error); ok {
|
||||
r0 = rf(local)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
Reference in New Issue
Block a user