-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
existing tests use a shared group which cross-contaminates tests so added a mitigation
- Loading branch information
Showing
6 changed files
with
75 additions
and
26 deletions.
There are no files selected for viewing
24 changes: 11 additions & 13 deletions
24
...mmon/src/main/java/pl/allegro/tech/hermes/domain/topic/TopicDeletedRecentlyException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
package pl.allegro.tech.hermes.domain.topic; | ||
|
||
import java.time.Instant; | ||
|
||
import pl.allegro.tech.hermes.api.ErrorCode; | ||
import pl.allegro.tech.hermes.api.TopicName; | ||
import pl.allegro.tech.hermes.common.exception.HermesException; | ||
|
||
|
||
public class TopicDeletedRecentlyException extends HermesException { | ||
|
||
public TopicDeletedRecentlyException(TopicName topicName, Instant thresholdTime) { | ||
super(String.format("Topic %s cannot created until %s", topicName.qualifiedName(), thresholdTime.toString())); | ||
} | ||
|
||
|
||
@Override | ||
public ErrorCode getCode() { // TODO Auto-generated method stub | ||
return ErrorCode.TOPIC_CREATED_RECENTLY; | ||
} | ||
|
||
public TopicDeletedRecentlyException(TopicName topicName, Instant thresholdTime) { | ||
super( | ||
String.format( | ||
"Topic %s cannot created until %s", | ||
topicName.qualifiedName(), thresholdTime.toString())); | ||
} | ||
|
||
@Override | ||
public ErrorCode getCode() { | ||
return ErrorCode.TOPIC_CREATED_RECENTLY; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters