mirror of https://github.com/fluffle/goirc
Race test changes.
This commit is contained in:
parent
c5830d598f
commit
ed6eb6115f
|
@ -573,13 +573,13 @@ func TestSTRaces(t *testing.T) {
|
||||||
go func(s string) {
|
go func(s string) {
|
||||||
st.NewNick("nick-" + s)
|
st.NewNick("nick-" + s)
|
||||||
c := st.NewChannel("#chan-" + s)
|
c := st.NewChannel("#chan-" + s)
|
||||||
st.Associate(c, st.me)
|
st.Associate(c.Name, "mynick")
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}(string(i))
|
}(string(i))
|
||||||
go func(s string) {
|
go func(s string) {
|
||||||
n := st.GetNick("nick-" + s)
|
n := st.GetNick("nick-" + s)
|
||||||
c := st.GetChannel("#chan-" + s)
|
c := st.GetChannel("#chan-" + s)
|
||||||
st.Associate(c, n)
|
st.Associate(c.Name, n.Nick)
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}(string(i))
|
}(string(i))
|
||||||
}
|
}
|
||||||
|
@ -589,19 +589,19 @@ func TestSTRaces(t *testing.T) {
|
||||||
race := func(ns, cs string) {
|
race := func(ns, cs string) {
|
||||||
wg.Add(5)
|
wg.Add(5)
|
||||||
go func() {
|
go func() {
|
||||||
st.Associate(st.GetChannel("#chan-"+cs), st.GetNick("nick-"+ns))
|
st.Associate("#chan-"+cs, "nick-"+ns)
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
st.GetNick("nick-"+ns).Channels()
|
st.GetNick("nick-"+ns)
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
st.GetChannel("#chan-"+cs).Nicks()
|
st.GetChannel("#chan-"+cs)
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
st.Dissociate(st.GetChannel("#chan-"+cs), st.GetNick("nick-"+ns))
|
st.Dissociate("#chan-"+cs, "nick-"+ns)
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
|
|
Loading…
Reference in New Issue