Removed the re-throw in the pop routines for in-memory and redis queue

References #9 and #23
This commit is contained in:
Mahesh V Kelkar 2015-03-25 14:03:24 -04:00 committed by R. Tyler Croy
parent 1f623174b1
commit 1a232c2553
17 changed files with 24 additions and 28 deletions

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:01 EDT 2015 -->
<title>AbstractHookQueue (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:01 EDT 2015 -->
<title>AbstractHookRunner (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:01 EDT 2015 -->
<title>HookRequest (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:01 EDT 2015 -->
<title>InMemoryQueue (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
<title>Publisher (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
<title>RedisQueue (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
<title>SequentialHookRunner (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
<title>WhoasConfiguration (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
<title>WhoasFactory (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
<title>WhoasQueueConfig (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">

View File

@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Generated by groovydoc (2.4.0) on -->
<title>Deprecated API (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="groovy.ico" type="image/x-icon" rel="icon">

View File

@ -8,7 +8,7 @@
<title>API Help (whoas 0.1.5 API)</title>
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="groovy.ico" type="image/x-icon" rel="icon">
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body class="center">

View File

@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Generated by groovydoc (2.4.0) on -->
<title>Index (whoas 0.1.5 API)</title>
<meta name="date" content="2015-03-24">
<meta name="date" content="2015-03-25">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body class="center">

View File

@ -63,7 +63,6 @@ class InMemoryQueue extends AbstractHookQueue {
/* Put this back on the tail end of the queue */
logger.info("\"Pop\" on in-memory queue failed, putting it back on the tail-end", ex)
this.internalQueue.put(item)
throw ex
}
finally {
}

View File

@ -129,7 +129,6 @@ class RedisQueue extends AbstractHookQueue {
/* Put this back on the front of the queue */
logger.info("\"Pop\" on redis queue failed, pushing it back on front of the queue", ex)
redisClient.lpush(this.queueConfig.key, messages.get(1))
throw ex
}
}
}

View File

@ -79,14 +79,13 @@ class InMemoryQueueSpecWithMessage extends InMemoryQueueWithGivenQueueSpec {
receivedMessage
}
def "pop() should requeue on exceptions and throw exception again"() {
def "pop() should requeue on exceptions"() {
when:
queue.pop {
throw new Exception("Spock'd!")
}
then:
thrown Exception
queue.size == 1
}

View File

@ -143,7 +143,6 @@ class RedisQueueSpec extends Specification {
queue.pop() { throw new Exception("Test Exception") }
then:
thrown Exception
queue.getSize() == 1
}
}