Skip to content

refactor: remove spec sleeps#212

Open
caspiano wants to merge 744 commits into
masterfrom
refactor/remove-spec-sleeps
Open

refactor: remove spec sleeps#212
caspiano wants to merge 744 commits into
masterfrom
refactor/remove-spec-sleeps

Conversation

@caspiano
Copy link
Copy Markdown
Contributor

@caspiano caspiano commented Jul 30, 2021

There were a bunch of sleeps littered through specs.
I think we should try to avoid these entirely.
if they are necessary, we should implement some kind of asynchronous abstraction or make requests synchronous.

stakach and others added 30 commits February 4, 2021 15:55
* feat(xovis sensor): inital work on API

currently working on response parsing

* feat: add get_token method

* feat: finish xovis sensor driver
improved proxy support
…t makes the upstream api respond much faster for some reason
introduces more flexible proxy configuration
to provide DNA spaces dashboard with status of the streams being consumed
* feat(sharp_pn): initial commit

* feat(sharp_pn): port over rest of driver

* feat(sharp_pn): add basic spec

* feat(sharp_pn): add spec for do_poll

* feat(sharp_pn): add delay/timeout for commands

* fix(sharp_pn): remove debugging

* chore(sharp_pn): crystal tool format
* feat(lg): initial commit

* feat(lg): add more methods

* feat(lg): add delay to some commands

* feat(lg): add cases on data receive

* fix(lg): handle commands that use the same value

* fix(lg): use safe self getter

* feat(lg): add specs for connected/do_poll

* feat(lg): add specs for power on/off

* fix(lg): use string form for query in specs

* feat(lg): group similar response behaviour

* chore(nec): add comments for Command1

* feat(lg): add test for input switching

* chore(lg): use warn instead of debug level logging

Co-authored-by: Kim Burgess <kim@place.technology>

* fix(lg): clear queue after hard_off

Co-authored-by: Kim Burgess <kim@place.technology>

* refactor(lg): use send and callback

* fix(lg): move connected to instance var

* fix(lg): update connected state

* chore(lg): run crystal format

* feat(lg ls5): implement minimal mute interface requirement

Co-authored-by: Philip Kheav <pkheav@Philips-MacBook-Pro.local>
Co-authored-by: Kim Burgess <kim@place.technology>
Co-authored-by: Stephen von Takach <steve@vontaka.ch>
* wip: epson projector conversion from ruby

* --no-edit

* wip

* wip

* docker-compose up --build not working

* wip

* fix(epson_proj): make compilable

* fix(epson_proj): use MuteLayer enum

* feat(epson_proj): add working send

* fix(epson_proj): use Array to store errors

* feat(epson_proj): add specs for do_poll

* feat(epson_proj): add more specs

* fix(epson_proj): store commands in hash

* fix(epson_proj): move unmute_volume to instance var

* feat(epson projector): simplify mute interface

crystal tool format

Co-authored-by: PlaceOS <support@place.technology>
Co-authored-by: Philip Kheav <philip.kheav@hotmail.com>
Co-authored-by: Stephen von Takach <steve@vontaka.ch>
* feat(pan_display): initial commit

* fix(pan_display): use specific specs for display

* fix(pan_display): remove projector specific code

* chore(pan/display): remove TODOs
* feat(nec_proj): initial copy from display driver

* feat(nec_proj): add command hash

* feat(nec_proj): add more functions

* feat(nec_proj): add more methods

* feat(nec_proj): add part of received method

* feat(nec_proj): add access for request in received

* feat(nec_proj): add more response processing

* chore(nec_proj): cleanup with crystal tool format

* chore(nec_proj): remove not needed commas

* feat(nec_proj): add input mapping for responses

* feat(nec_proj): add more response handling

* feat(nec_proj): add power status response handling

* fix(nec_proj): correct checksum calculation

* feat(nec_proj): add first passing spec

* feat(nec_proj): add spec for input?

* feat(nec_proj): add specs for do_poll

* feat(nec_proj): add proper specs for lamp/filter usage

* feat(nec_proj): store responses in enum

* chore(nec_proj): run crystal tool format

* chore(nec_port): use from_bytes? instead

* feat(nec_proj): add volume response processing

* feat(nec_proj): add spec for switch_audio

* feat(nec_proj): add more mute response handling

* chore(nec_proj): remove debugging

* chore(nec_proj): add type for command

* chore(nec_proj): make comment more clear

* feat(nec np series): simplify mute implementation

Co-authored-by: Stephen von Takach <steve@vontaka.ch>
* feat(mdc): set targets to nil once stable

* fix(mdc): remove stable instance vars
* fix(bookings): pass correct params

* fix(bookings): use PlaceCalendar::Event::Attendee

* fix(bookings): remove default invalid calendar_id

* fix(bookings): set default calendar_id to nil

* fix(bookings): calculate ending using starting

* fix(bookings): default owner to @calendar_id

* fix(bookings): pass nil for owner

* fix(bookings): update booking info after book_now

* fix(bookings): set correct attendee fields for room

* fix(bookings): correct typo for status

* fix(bookings): remove o365 specific attendee status

* fix(bookings): set room response to accepted

* fix(bookings): allow owner of booking to be specified

* fix(bookings): always use system/room email

* fix(bookings): add non nil assertion for room_email
* feat(gc): initial commit

* fix(gc): get code to compile

* fix(gc): remove delimiter

* fix(gc): split relay and port config

* feat(gc): add more specs

* feat(gc): add specs for all methods

* fix(global cache gc100 spec): requires delay before testing values

Co-authored-by: Stephen von Takach <steve@vontaka.ch>
* chore(qsc): initial commit

* feat(qsc): get something compiling

* feat(qsc): add mute/fader functions

* feat(qsc): add helper to update change group

* feat(qsc): add quick dirty port of shellsplit

* feat(qsc): expose request in response handling

* feat(qsc): port over rest of driver

* chore(qsc): run crystal tool format

* feat(qsc): add basic specs

* fix(qsc): move login to on_update

* fix(qsc): remove wait: false from options

* feat(qsc): add specs for emergency id

* fix(qsc): change id to String instead of Int

* feat(qsc): add specs for mute/faders

* feat(qsc): add specs for phone methods

* fix(qsc): reduce spec to bare basic

* chore(qsc): check for emergency setting inline

* Revert "chore(qsc): check for emergency setting inline"

This reverts commit 6aaea44.

* fix(qsc): uncomment lines
stakach and others added 22 commits July 21, 2021 16:54
* fix(vergesense): Type of Space.People.coordinates

* style(vergesense): whitespace
* fix(vergesense): Type of Space.People.coordinates

* style(vergesense): whitespace

* fix(vergesense): Null space_ref_id seen in the wild
was previously looking for location objects for map details
use locker key as the primary method for accessing lockers
@caspiano caspiano force-pushed the refactor/remove-spec-sleeps branch from dcb2585 to a8beff8 Compare August 3, 2021 01:50
@caspiano caspiano force-pushed the refactor/remove-spec-sleeps branch from a8beff8 to 3a3e4d9 Compare August 3, 2021 01:52
@caspiano caspiano marked this pull request as ready for review August 3, 2021 01:52
@kimburgess
Copy link
Copy Markdown
Contributor

Responses from exec's can be awaiting by calling #get on their result, which blocks until the Future resolves. One that I've defined run into (and had to insert a sleep to accomodate) is the initial init / settings load.

This change is definitely the correct thing to do, but will need to be synchronised with improvements to spec-runner.

@stakach stakach force-pushed the refactor/remove-spec-sleeps branch from 3a3e4d9 to f8c8a5f Compare May 8, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.