Skip to content

Commit 0289cd6

Browse files
committed
Fix failing build
1 parent 9b64206 commit 0289cd6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

commands/run_test.go

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
package commands
22

33
import (
4+
"github.com/chermehdi/egor/config"
5+
"github.com/chermehdi/egor/utils"
6+
"github.com/stretchr/testify/assert"
47
"os/exec"
58
"testing"
6-
7-
"github.com/stretchr/testify/assert"
89
)
910

1011
func TestTimedOutExecution(t *testing.T) {
1112
cmd := exec.Command("sleep", "1.1")
12-
status, _, err := timedExecution(cmd, 1000+TimeOutDelta)
13+
status, _, err := utils.ExecuteWithTimeout(cmd, 1000+config.TimeOutDelta)
1314
assert.Equal(t, err, nil)
14-
assert.Equal(t, status, TO)
15+
assert.Equal(t, status, config.TO)
1516
}
1617

1718
func TestTimedExecution(t *testing.T) {
1819
cmd := exec.Command("sleep", "1")
19-
status, _, err := timedExecution(cmd, 1000+TimeOutDelta)
20+
status, _, err := utils.ExecuteWithTimeout(cmd, 1000+config.TimeOutDelta)
2021
assert.Equal(t, err, nil)
21-
assert.Equal(t, status, OK)
22+
assert.Equal(t, status, config.OK)
2223
}
2324

2425
func TestChecker_TokenBasedCheckerShouldIgnoreSpaces(t *testing.T) {

0 commit comments

Comments
 (0)