Code

#19206 closed Cleanup/optimization (duplicate)

Stale tmp files after running the testsuite.

Reported by: apollo13 Owned by: nobody
Component: Testing framework Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by apollo13)

As seen on the ci, Django's testsuite leaves some data behind:

4.1k	./django_Esgc5K/tmpuI9dnf
8.2k	./django_Esgc5K/tmpeTp_A1/tests
8.2k	./django_Esgc5K/tmpeTp_A1/foo
21k	./django_Esgc5K/tmpeTp_A1
4.1k	./django_Esgc5K/tmp5wdSuu
33k	./django_Esgc5K
37k	./tmpSyauUn/x86
41k	./tmpSyauUn/amd64
4.1k	./tmpSyauUn/minidumps
779k	./tmpSyauUn/extensions/fxdriver@googlecode.com/resource/modules
816k	./tmpSyauUn/extensions/fxdriver@googlecode.com/resource
2.5M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/Linux_x86-gcc3/components
2.5M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/Linux_x86-gcc3
1.4M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/WINNT_x86-msvc/components
1.4M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/WINNT_x86-msvc
2.6M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/Linux_x86_64-gcc3/components
2.6M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/Linux_x86_64-gcc3
6.4M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform
25k	./tmpSyauUn/extensions/fxdriver@googlecode.com/content
2.9M	./tmpSyauUn/extensions/fxdriver@googlecode.com/components
11M	./tmpSyauUn/extensions/fxdriver@googlecode.com
11M	./tmpSyauUn/extensions
4.1k	./tmpSyauUn/webapps
8.2k	./tmpSyauUn/bookmarkbackups
4.1k	./tmpSyauUn/Cache/D
4.1k	./tmpSyauUn/Cache/2
4.1k	./tmpSyauUn/Cache/A
4.1k	./tmpSyauUn/Cache/1
4.1k	./tmpSyauUn/Cache/7
4.1k	./tmpSyauUn/Cache/6
4.1k	./tmpSyauUn/Cache/0
4.1k	./tmpSyauUn/Cache/F
4.1k	./tmpSyauUn/Cache/8
4.1k	./tmpSyauUn/Cache/4
4.1k	./tmpSyauUn/Cache/E
4.1k	./tmpSyauUn/Cache/C
4.1k	./tmpSyauUn/Cache/B
4.1k	./tmpSyauUn/Cache/5
4.1k	./tmpSyauUn/Cache/9
4.1k	./tmpSyauUn/Cache/3
111k	./tmpSyauUn/Cache
4.1k	./tmpSyauUn/startupCache
29M	./tmpSyauUn
4.1k	./tmpz38m5u
37k	./hsperfdata_jenkins
11M	./tmpjTVehh/test_upload
11M	./tmpjTVehh
11M	./tmpgeUZWe/test_upload
11M	./tmpgeUZWe

extensions/fxdriver@… seems to be coming from selenium, but the rest is from us, we should try to get rid of those! The folders with test_upload are coming from regressiontests/file_uploads and regressiontests/admin_views -- I have no idea yet on how to add a cleanup routine there (yet).

Attachments (0)

Change History (8)

comment:1 Changed 18 months ago by apollo13

The selenium part of the tests is now fixed by upgrading selenium on the buildserver.

comment:2 Changed 18 months ago by apollo13

  • Description modified (diff)

comment:3 Changed 18 months ago by d1ffuz0r

In tests don't have exit from selenium at end of tests. need use selenium.quit() for to close session

(django)django|master ⇒ grep -rl selenium.close tests
(django)django|master ⇒ grep -rl selenium.quit tests
(django)django|master ⇒

Last edited 18 months ago by d1ffuz0r (previous) (diff)

comment:4 Changed 18 months ago by lrekucki

At some point, I was thinking about adding suffix=__module__ (apart from prefix=django) to every tmpdir/tmpfile call, so it's easier to track which test didn't cleanup. Do you think it's a good idea?

comment:5 Changed 18 months ago by claudep

  • Component changed from Uncategorized to Testing framework
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Cleanup/optimization

comment:6 Changed 18 months ago by Claude Paroz <claude@…>

In 73245b3285f63694d2c63c9b197165dc6d9cfd4e:

Prevented file_upload tests to leave files behind

Refs #19206.

comment:7 Changed 18 months ago by Claude Paroz <claude@…>

In 2f9f211da867d872a0d3576c3ac515d74f5798cd:

[1.5.x] Prevented file_upload tests to leave files behind

Refs #19206.
Backport of 73245b3 from master.

comment:8 Changed 16 months ago by aaugustin

  • Resolution set to duplicate
  • Status changed from new to closed

This is a duplicate of #17215. Let's follow up over there.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.