Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bcongdon committed Apr 28, 2018
1 parent 421633a commit dc9bbad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (d *Driver) runMapPhase(job *Job, jobNumber int, inputs []string) {
inputSplits := job.inputSplits(inputs, d.config.SplitSize)
if len(inputSplits) == 0 {
log.Warnf("No input splits")
os.Exit(0)
return
}
log.Debugf("Number of job input splits: %d", len(inputSplits))

Expand Down Expand Up @@ -188,7 +188,7 @@ func (d *Driver) run() {

if len(d.config.Inputs) == 0 {
log.Error("No inputs!")
os.Exit(1)
return
}

inputs := d.config.Inputs
Expand Down
4 changes: 3 additions & 1 deletion lambda_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ func TestHandleRequest(t *testing.T) {
WorkingLocation: ".",
}

job := &Job{}
job := &Job{
config: &config{},
}

// These values should be reset to 0 by Lambda handler function
job.bytesRead = 10
Expand Down

0 comments on commit dc9bbad

Please sign in to comment.