Consolidate repeated unit test setup code into helper functions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- c
- Ambito
- embedded-iot, testing
Direzione di ricerca
L'issue non indica file o test specifici. Inizia individuando le suite di unit test di CF e facendo un inventario della configurazione ripetuta delle precondizioni per le PDU di input e output; conferma le sequenze comuni e i relativi chiamanti prima di scegliere i confini degli helper. Il lavoro è completato quando la configurazione ripetuta è centralizzata e gli unit test continuano a passare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In the CF unit tests, the "preconditions" for each test case are often very similar, but instead of being set up through some sort of helper function, the code is cut-and-pasted. As a result, code to set up for particular preconditions may be repeated dozens of times in the unit test.
This incurs a significant maintenance cost when the FSW data structures need to change in any way (and they will, the FSW is not set in stone and will need to be maintained). A small change to FSW can affect many different unit test cases. This wouldn't be a big problem if the setup was in some sort of helper function, but since it is repeated, each affected case must be individually found and fixed. As a result, the time cost of maintaining the unit test is extremely high.
To reduce this cost, common sequences of setup (such as setting up for an input PDU, an output PDU, etc) should be consolidated into a helper function, so only this function needs to change if the internal FSW structures change.
- Lingua principale
- C
- Stelle
- 122
- Fork
- 79
- Merge medio
- 1g 15h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nasa/CF
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Assert checks non-existent variable (`pt`) in `CF_CFDP_ProcessPlaybackDirectory()`Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertainvalid
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
-
Transaction priority sorted incorrectlyForse già presa @dmknutsen l’ha presa 893 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
CF_Chunks_Insert drops all data after the chunk list fills, so a lossy Class 2 upload is mostly resentForse già presa @SpaceOceanCorp l’ha presa oggi. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Issue simili
-
Memory leak: "Add to Playlist" (`CMD_EVENT_ADD_TO_PLAYLIST`) never frees the playlist it loadsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Signed/unsigned mix in the EOCD backward scan rejects valid archives with a 65535-byte commentAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
area: recompiler area: runtime kind: bug preview-effort: small priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Prism::Translation::Parser raises NoMethodError for a method with a &nil parameter and a bodyForse già presa @bbatsov l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno