~fwereade/juju-core/uniter-filter-watches

« back to all changes in this revision

Viewing changes to worker/uniter/relation/relation_test.go

  • Committer: William Reade
  • Author(s): William Reade
  • Date: 2012-09-25 23:11:29 UTC
  • mfrom: (561.1.9 juju-core)
  • Revision ID: fwereade@gmail.com-20120925231129-9hkgf5qtpgzegueu
state: drop RelationUnit.Pinger; consequences

This branch comprises:

* Complete removal of RelationUnit.Pinger;
* A pleasingly simple RelationUnitsWatcher et al;
* A lot of s/int/int64/ to allow for mgo/txn revnos rather than ZK versions;
* A large ugly addition to relation_test.go, ported directly from the
  original RUW tests with presence usage excised;
* Minimal changes to Relationer, using EnterScope/LeaveScope only;
* Minimal changes to tests in uniter to accommodate new Relationer;
* Extra changes in uniter_test.go to get a couple of Uniter tests passing.

R=niemeyer
CC=
https://codereview.appspot.com/6567044

Show diffs side-by-side

added added

removed removed

Lines of Context:
310
310
func assertState(c *C, dir *relation.StateDir, relsdir string, relationId int, members msi, pending string, deleted bool) {
311
311
        expect := &relation.State{
312
312
                RelationId:     relationId,
313
 
                Members:        map[string]int(members),
 
313
                Members:        map[string]int64(members),
314
314
                ChangedPending: pending,
315
315
        }
316
316
        c.Assert(dir.State(), DeepEquals, expect)