~samwhited/xmpp

68d1af253cd6258e04e4f77c546406a744bd5399 — Sam Whited 2 months ago c98da39
carbons: remove unnecessary sync in tests

Signed-off-by: Sam Whited <sam@samwhited.com>
1 files changed, 0 insertions(+), 5 deletions(-)

M carbons/carbons_test.go
M carbons/carbons_test.go => carbons/carbons_test.go +0 -5
@@ 19,12 19,8 @@ import (

func TestEnableDisable(t *testing.T) {
	var out bytes.Buffer
	stop := make(chan struct{}, 2)
	cs := xmpptest.NewClientServer(
		xmpptest.ServerHandlerFunc(func(t xmlstream.TokenReadEncoder, start *xml.StartElement) error {
			defer func() {
				stop <- struct{}{}
			}()
			e := xml.NewEncoder(&out)
			err := e.EncodeToken(*start)
			if err != nil {


@@ 52,7 48,6 @@ func TestEnableDisable(t *testing.T) {
		t.Fatalf("unexpected error disabling carbons: %v", err)
	}

	<-stop
	output := out.String()
	const expected = `<iq xmlns="jabber:client" xmlns="jabber:client" type="set" id="000"><enable xmlns="urn:xmpp:carbons:2" xmlns="urn:xmpp:carbons:2"></enable></iq><iq xmlns="jabber:client" xmlns="jabber:client" type="set" id="000"><disable xmlns="urn:xmpp:carbons:2" xmlns="urn:xmpp:carbons:2"></disable></iq>`
	if output != expected {