Skip to content

Commit

Permalink
Minor patches to make jJ runs mostly work
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Nov 17, 2023
1 parent 0304509 commit d94d8d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestMain(m *testing.M) {
}
case 'J':
testCase[i] = api.ClientType{
Lang: api.ClientTypeRust,
Lang: api.ClientTypeJS,
HS: "hs2",
}
// TODO: case 'R': requires 2x sliding syncs / postgres
Expand Down
6 changes: 5 additions & 1 deletion tests/membership_acls_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package tests

import (
"fmt"
"testing"
"time"

Expand Down Expand Up @@ -240,9 +241,11 @@ func TestBobCanSeeButNotDecryptHistoryInPublicRoom(t *testing.T) {

// bob hits scrollback and should see but not be able to decrypt the message
bob.MustBackpaginate(t, roomID, 5)
// jJ runs need this, else the event will exist but not yet be marked as failed to decrypt. Unsure why fed slows it down.
time.Sleep(500 * time.Millisecond)
ev := bob.MustGetEvent(t, roomID, evID)
must.NotEqual(t, ev.Text, beforeJoinBody, "bob was able to decrypt a message from before he was joined")
must.Equal(t, ev.FailedToDecrypt, true, "message not marked as failed to decrypt")
must.Equal(t, ev.FailedToDecrypt, true, fmt.Sprintf("message not marked as failed to decrypt: %+v", ev))
})
}

Expand Down Expand Up @@ -322,6 +325,7 @@ func TestOnRejoinBobCanSeeButNotDecryptHistoryInPublicRoom(t *testing.T) {

// bob hits scrollback and should see but not be able to decrypt the message
bob.MustBackpaginate(t, roomID, 5)
// TODO: jJ runs fail as the timeline omits the event e.g it has leave,join and not leave,msg,join.
ev := bob.MustGetEvent(t, roomID, evID)
must.NotEqual(t, ev.Text, onlyAliceBody, "bob was able to decrypt a message from before he was joined")
must.Equal(t, ev.FailedToDecrypt, true, "message not marked as failed to decrypt")
Expand Down

0 comments on commit d94d8d6

Please sign in to comment.