Skip to content

Commit dded172

Browse files
committed
Merge pull request #535 from carroux/periods_in_job_names
Allow periods in job names
2 parents 9de3529 + ad1a530 commit dded172

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/main/scala/org/apache/mesos/chronos/scheduler/jobs/JobUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import scala.collection.mutable.ListBuffer
1919
*/
2020
object JobUtils {
2121

22-
val jobNamePattern = """([\w\s#_-]+)""".r
22+
val jobNamePattern = """([\w\s\.#_-]+)""".r
2323
val stats = new mutable.HashMap[String, DescriptiveStatistics]()
2424
val maxValues = 100
2525
//The object mapper, which is, according to the docs, Threadsafe once configured.

src/test/scala/org/apache/mesos/chronos/scheduler/jobs/JobUtilsSpec.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,10 @@ class JobUtilsSpec extends SpecificationWithJUnit with Mockito {
6464
scheduledJobWithArguments.command.toString must_== commandWithArguments
6565
dependencyJobWithArguments.command.toString must_== commandWithArguments
6666
}
67+
68+
"Accepts a job name with periods" in {
69+
val jobName = "sample.name"
70+
71+
JobUtils.isValidJobName(jobName)
72+
}
6773
}

0 commit comments

Comments
 (0)