 Logger          = $src "logger"
 
 MasterHelper    = require "./helpers/master"
+
+weak = require "weak"
 
 debug = require("debug")("sm:tests:master")
 

                expect(slave.streams).to.have.property STREAM1.key
                done()

        it "should deny a slave that provides the wrong password"
            expect(streams_emitted).to.be.true
            done()

        it "should destroy a stream when asked", (done) ->
            stream = weak(mm.master.master.streams[STREAM1.key])
            mm.master.master.removeStream stream, (err) =>
                throw err if err

                expect(mm.master.master.streams).to.not.have.property STREAM1.key

                if global.gc
                    global.gc()
                    expect(stream.key).to.be.undefined
                    done()
                else
                    console.log "Skipping GC deref test. Run with --expose-gc"
                    done()

    # -- Slaves -- #

    describe "Slave Connections", ->
