xpra icon
Bug tracker and wiki

Opened 17 months ago

Last modified 3 days ago

#1773 assigned task

better unit tests for mixins

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 3.0
Component: core Version: 2.2.x
Keywords: Cc:

Description (last modified by Antoine Martin)

Follow up from #1761. See also #1778

We already have basic unit tests for client and server mixins:

  • r18558 server: mmap and remote logging
  • r18534 client: mmap and network state
  • r18535 client: remote logging

Only getting good test coverage will ensure that each mixin is independent from the others.

Change History (6)

comment:1 Changed 16 months ago by Antoine Martin

Description: modified (diff)
Status: newassigned

comment:2 Changed 10 days ago by Antoine Martin

  • r23106 adds an audio client mixin test, new issues to deal with:
    • duplication of self._remote_machine_id
    • python2 segfaults (meh)
    • first audio packets may come out of order! ('sound-data' before 'sound-control')
  • r23107 split test
  • r23108 adds a clipboard test, new issues:
    • run under X11 - needs to start a new display
    • verify clipboard state externally? (using xclip?)

comment:3 Changed 9 days ago by Antoine Martin

Added more client mixins tests - now mostly complete (just without rpc test):

Still TODO:

  • test multiple times with different options combinations / different server capabilities
  • test coverage
  • server mixins tests

comment:4 Changed 9 days ago by Antoine Martin

Server mixins tests:

New tasks:

  • source mixin tests
  • parse some network packets
  • control commands: split them up?

comment:5 Changed 4 days ago by Antoine Martin

  • r23139 refactoring so we can test packets without an actual connection
  • r23140 re-order mixins init to make them more resilient
  • r23141 test sending audio packets. (audio mixin cannot assume that machine_id or uuid exist)
  • r23142 test starting a new command and then sending it a signal
  • r23143 encoding mixin - cannot assume that _idle_refresh_all_windows, send_windows and ui_client exist (heavy dependency on window mixin)
  • r23144 fixup file-print test
  • r23147 remote-logging packet test
  • r23149 fixes a huge bug in the ping / client-latency calculations
  • r23151 all network state packets - cannot assume we have statistics object
  • r23152 test notification packets
  • r23155 + r23157 move file-print and network-state packet handlers out of the UI thread
  • r23156 logging locking and cleanup

New tasks:

  • display, input and clipboard tests need to start their own display
  • file-print: needs to send chunks and verify file gets created
  • input test: could be used to test character sets and foreign keyboard layouts (hard!)
  • notification code needs to be moved to a source mixin

comment:6 Changed 3 days ago by Antoine Martin

Updates:

  • r23166 fixes a test error in the command-server test now that we pass a fake source mixin to the server mixin
  • r23167 + r23168: fix stop audio from client using sequence number, allowing:
  • r23169 audio client test made deterministic thanks to fixes above
  • r23170 audio server prevents spurious audio packets after stop request

Updated TODO:

  • audio needs test mp3 data to test receiving
  • verify all server source mixins have a server test
  • control commands
  • file-print: needs to send chunks and verify file gets created
  • many tests need to start an X11 display
  • test coverage: #2356
  • test multiple times with different options combinations / different server capabilities
  • combine client and server mixins in one test: #2357
  • input test: could be used to test character sets and foreign keyboard layouts (hard!)
  • notification code needs to be moved to a source mixin
Note: See TracTickets for help on using tickets.