deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rafab...@apache.org
Subject deltaspike git commit: Fixed: DELTASPIKE-908 org.apache.deltaspike.test.scheduler.custom.CustomSchedulerWarFileTest fails with Weld
Date Fri, 22 May 2015 18:22:49 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 391dbb4d8 -> 31b674d5b


Fixed: DELTASPIKE-908 org.apache.deltaspike.test.scheduler.custom.CustomSchedulerWarFileTest
fails with Weld


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/31b674d5
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/31b674d5
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/31b674d5

Branch: refs/heads/master
Commit: 31b674d5bf3fe79d9d5fc037d3d5f10ac592adf3
Parents: 391dbb4
Author: Daniel Cunha (soro) <danielsoro@gmail.com>
Authored: Fri May 22 14:55:45 2015 -0300
Committer: Daniel Cunha (soro) <danielsoro@gmail.com>
Committed: Fri May 22 14:59:47 2015 -0300

----------------------------------------------------------------------
 .../scheduler/custom/CustomSchedulerTest.java   | 12 ++++++---
 .../test/scheduler/custom/DeleteJob.java        | 26 ++++++++++++++++++++
 2 files changed, 34 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/31b674d5/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java
b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java
index b7ec800..7b965ae 100644
--- a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java
+++ b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java
@@ -89,12 +89,16 @@ public abstract class CustomSchedulerTest
         Assert.assertTrue(this.scheduler.isExecutingJob(ManualJob.class));
         Assert.assertEquals(0, testJobManager.getRegisteredJobs().size());
         this.scheduler.interruptJob(ManualJob.class);
+    }
 
-        this.scheduler.registerNewJob(AutoRegisteredJob.class);
-        Assert.assertEquals(1, testJobManager.getRegisteredJobs().size());
+    @Test
+    public void checkDeleteJob() {
 
-        this.scheduler.deleteJob(AutoRegisteredJob.class);
-        Assert.assertEquals(0, testJobManager.getRegisteredJobs().size());
+        this.scheduler.registerNewJob(DeleteJob.class);
+        Assert.assertTrue(testJobManager.getRegisteredJobs().contains(DeleteJob.class));
+
+        this.scheduler.deleteJob(DeleteJob.class);
+        Assert.assertFalse(testJobManager.getRegisteredJobs().contains(DeleteJob.class));

     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/31b674d5/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/DeleteJob.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/DeleteJob.java
b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/DeleteJob.java
new file mode 100644
index 0000000..6f540c5
--- /dev/null
+++ b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/DeleteJob.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.test.scheduler.custom;
+
+import org.apache.deltaspike.scheduler.api.Scheduled;
+
+@Scheduled(cronExpression = "*/1 * * * * ?", onStartup = false)
+public class DeleteJob implements CustomJob
+{
+}


Mime
View raw message