Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
philchia committed May 9, 2019
1 parent 648aa6c commit 65db030
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 8 additions & 3 deletions agollo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ func TestAgolloStart(t *testing.T) {
t.Errorf("Start with fake.properties should return err, got :%v", err)
}

if err := StartWithConfFile("./testdata/app.properties"); err != nil {
t.Errorf("Start with app.properties should return nil, got :%v", err)
}
if err := Stop(); err != nil {
t.Errorf("Stop should return nil, got :%v", err)
}
os.Remove(defaultClient.getDumpFileName())

if err := StartWithConfFile("./testdata/app.properties"); err != nil {
t.Errorf("Start with app.properties should return nil, got :%v", err)
}
Expand Down Expand Up @@ -124,7 +132,4 @@ func TestAgolloStart(t *testing.T) {
if val != `1` {
t.Errorf(`GetStringValueWithNameSpace of new_namespace.json content should = 1, got %v`, val)
}

Stop()

}
1 change: 0 additions & 1 deletion poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func (p *longPoller) addNamespaces(namespaces ...string) error {
}

func (p *longPoller) watchUpdates() {

timer := time.NewTimer(p.pollerInterval)
defer timer.Stop()

Expand Down

0 comments on commit 65db030

Please sign in to comment.