Commit Graph

28 Commits

Author SHA1 Message Date
Marcel Klehr
06d6cf4ebc JobListTest: Fix JobList constructor call
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-04-24 19:07:13 +02:00
Marcel Klehr
6148c5e0a1
Update tests/lib/BackgroundJob/DummyJobList.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-04-24 12:35:52 +02:00
Marcel Klehr
a0c722ad69 Run cs:Fix
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-04-23 12:36:12 +02:00
Marcel Klehr
5608b50778 Fix BackgroundJob tests
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-04-23 12:36:12 +02:00
Marcel Klehr
281c8047b6 JobListTest: clearJobsList before testHasReservedJobs
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-04-23 12:36:12 +02:00
Marcel Klehr
56cb5d1d13 fix(tests): Remove duplicated method
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-04-23 12:36:12 +02:00
Marcel Klehr
1296f3612e test(BackgroundJobs): Add tests for allowParallelRuns and hasReservedJobs
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-04-23 12:36:12 +02:00
Côme Chilliet
d74044f634
Fix API breakage by using a new method instead
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-12 17:18:59 +01:00
Côme Chilliet
75fca38e66
Fix BackgroundJob list tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-12 11:40:18 +01:00
Carl Schwan
48d9c4d2b0
Port existing server code to new interface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-08 17:03:19 +02:00
Côme Chilliet
0386f4270b
Fix DummyJobList typing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-07-12 14:27:02 +02:00
Côme Chilliet
50a7f612d9 Fix DummyJobList class used by tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-07-11 09:46:23 +00:00
Kirill Popov
0b27b9e658 Get not only time-sensitive next job from list but any
Before the change webcron used to select
**only** time-sensitive tasks.

Signed-off-by: Kirill Popov <kirill.s.popov@gmail.com>
2022-04-24 21:55:53 +03:00
Joas Schilling
b765f79368
Allow apps to specify if their background job can be delayed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-07 13:54:54 +01:00
Joas Schilling
9cd9f4b4bc
Move queries to the joblist
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-14 09:57:16 +02:00
Morris Jobke
16d83ab30a
Remove getLastJob from IJobList
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-13 21:50:06 +02:00
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +02:00
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:21:27 +01:00
Daniel Kesselberg
018020108b
Make sure to catch php errors during job execution
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-01-31 16:04:04 +01:00
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +01:00
Roeland Jago Douma
8493f49211
fixup! fixup! Add backgroundjobs to OCP
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-09 15:25:56 +02:00
Morris Jobke
43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-24 17:45:32 +02:00
Noveen Sachdeva
1b1f403a5d
Add duration of last job execution to the table 2017-04-25 17:39:58 +02:00
Roeland Jago Douma
c4ef825ceb
Fix getMock JobListTest 2016-09-13 09:09:52 +02:00
Joas Schilling
d0a2fa0506
Lock jobs while executing them, to allow multiple executors to run in parallel 2016-05-21 01:59:25 +02:00
Joas Schilling
94ad54ec9b Move tests/ to PSR-4 (#24731)
* Move a-b to PSR-4

* Move c-d to PSR-4

* Move e+g to PSR-4

* Move h-l to PSR-4

* Move m-r to PSR-4

* Move s-u to PSR-4

* Move files/ to PSR-4

* Move remaining tests to PSR-4

* Remove Test\ from old autoloader
2016-05-20 15:38:20 +02:00