Re: Improving testing speed

Mathias Behrle via Roundup-devel <[email protected]> Thu, 10 Feb 2022 08:48:27 +0100
Newsgroups gmane.comp.bug-tracking.roundup.devel
Organization MBSolutions
Message-ID <[email protected]>
* John P. Rouillard: " [Roundup-devel] Improving testing speed" (Wed, 09 Feb
  2022 20:54:24 -0500):

Hi John,

I can't comment on your idea, it looks interesting.

JFTR you probably know about the following facts.

For testing purposes you can also use settings that are dangerous on production
like

synchronous_commit = off        # synchronization level;
fsync = off             # turns forced synchronization on or off

Probably you did already search for things like
https://stackoverflow.com/questions/9407442/optimise-postgresql-for-fast-testing
and test database caching
https://github.com/tk0miya/testing.postgresql
or reusable containers.

Best,
Mathias




> Hi all:
> 
> Testing on the postgresql and mysql backends are particularly slow.
> From a quick run, it looks like the setup routine that creates a database
> and populates it takes a good amount of time.
> 
> I am considering trying to change postgresql at least to:
> 
>   1) create a templatedb in the setup method and record the existence of
>      the database as a property of the test object.
>   2) for each test that calls setup(), initialize
>      the test database using: create rounduptest WITH TEMPLATE templatedb
> 
> Anybody know if this would work and if it would speed up the setup
> routine?
> 
> Doesn't look like mysql or sqlite have an equivalent method but.....
>  
> Have a great week.
> 
> --
> 				-- rouilj
> John Rouillard
> ===========================================================================
> My employers don't acknowledge my existence much less my opinions.
> 
> 
> _______________________________________________
> Roundup-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/roundup-devel



-- 

    Mathias Behrle
    MBSolutions
    Gilgenmatten 10 A
    D-79114 Freiburg

    Tel: +49(761)471023
    Fax: +49(761)4770816
    http://www.m9s.biz
    UStIdNr: DE 142009020
    PGP/GnuPG key availabable from any keyserver, ID: 0xD6D09BE48405BBF6
    AC29 7E5C 46B9 D0B6 1C71  7681 D6D0 9BE4 8405 BBF6

_______________________________________________
Roundup-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-devel
signature.asc (application/pgp-signature, 867 B)
-----BEGIN PGP SIGNATURE-----
Comment: Signed by Mathias Behrle

iQIzBAEBCgAdFiEErCl+XEa50LYccXaB1tCb5IQFu/YFAmIEw0sACgkQ1tCb5IQF
u/Yx7Q/6A+zUO6548SeJ/BPsCuGQuw8U7A80GUe+pKqfkxpbtQ890VAJMx0EuL+H
3+a7D/zDW/0OFKn4dHDycfBzca5rIaSkmDvydemw/hqHAzaJ2uCYAYKILeOkdtmD
3WYIwVxVTX0CeitrBsBbIT4mgnnW0j6hJWKmvQlRjetEarfX22NUHqb2IA/nswlE
BYWILZswPPA+xIRdBI0lTaiptt0LW7i+ZwPJx5AgYq0mSH2cZoXS5XJquZp3/3Ro
HTXceDcNfNisiZj3jhKt9gxLdICblOvVrCxd8svfU3acgBLMqvewjH/HKbBEPN1v
yW7PpWHQ93TmGN3euh6AAbSL3iUQslGMNZrjdGenGFzTwP2OOQsWgxqjIU2pgWxs
NcF8cWZlT6rNKIDNel+dzfjQ+eTnH570PuqmFCmQh7bHwc8slqqi2G+rgrJMg+VY
o2twBnkbbGFr6P1YwWvjTcbqF0W8qMp4YEvPUXyKuIl9Y8KAbALl22EryjB0PZJV
R4IaN2F3hmMO8MSD5E59AaXrEcK4SP8q17KzoQym21FLzQSI/y+yfIAE7lHyjUlW
seV5wI5wFy+Qo950DwQOTKKbedkgwJggqEPNEqfFtSTgoCgOrfPmyiHI+YJB5uAF
fiXqFJhfhQpuOPWgDT4tCKe26vPrsWHISdBca3SDa355/yakd4k=
=uDdd
-----END PGP SIGNATURE-----