Hi Francesco and Fabio,

> > I hope you wouldn't use DAOs into integration test; I don't like it so much.
> 
> While I find this wrong too, I can add that this is not even possible because
> the integration test classes do not have access to core's EntityManager.

Sure, DAO is no way for rest integration tests.

> The easiest way to create a PropagationTask or a NotificationTask is then to
> create an user or a role.

Thanks, will try it. This scenario will be even more realistic as preconfigured 
Propagation & Notification Tasks.

> >> 2)      Is it possible to stop sync task without deleting it?
> > No way as far as I know. Task management is handled by Quartz.
> 
> Confirm: tasks are executed as Quartz jobs.

It conforms my finding, but I already found workaround.

Thanks for support!

Regards,
Andrei.

> -----Original Message-----
> From: Francesco Chicchiriccò [mailto:[email protected]]
> Sent: Mittwoch, 16. Januar 2013 13:12
> To: [email protected]
> Subject: Re: [Question] Tasks related questions
> 
> On 16/01/2013 13:03, Fabio Martelli wrote:
> > Il giorno 16/gen/2013, alle ore 11.57, Andrei Shakirin ha scritto:
> >
> >> Hi,
> >>
> >> I have two questions regarding tasks in context of SYNCOPE-268:
> >>
> >>
> >> 1)      Is there easy way to create Notification and Propagation tasks?
> >>
> >> Tests issueSyncope81() and deal() delete preconfigured Propagation task
> (id=1) and Notification task (id=8).
> >>
> >> To make tests re-runnable I need to recreate them, but cannot find easy
> way to do it.
> > Hi Andrei, the easiest way is by DAO.
> > Actually I cannot see any alternative: no rest method are exposed to
> explicitly create Propagation/Notification tasks.
> 
> PropagationTask instances are created by the PropagationManager,
> NotificationTask instances by the NotificationManager. This takes place in
> UserController and RoleController, when users or roles are created /
> updated / deleted.
> 
> There is absolutely no functional reason to expose REST methods to create
> PropagationTask or NotificationTask instances.
> 
> The easiest way to create a PropagationTask or a NotificationTask is then to
> create an user or a role.
> 
> > I hope you wouldn't use DAOs into integration test; I don't like it so much.
> 
> While I find this wrong too, I can add that this is not even possible because
> the integration test classes do not have access to core's EntityManager.
> 
> >> 2)      Is it possible to stop sync task without deleting it?
> > No way as far as I know. Task management is handled by Quartz.
> 
> Confirm: tasks are executed as Quartz jobs.
> 
> Regards.
> 
> --
> Francesco Chicchiriccò
> 
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
> http://people.apache.org/~ilgrosso/

Reply via email to