Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAH-1649 - | Rohit | - Upgrades module versions as per openmrs 2.4.2 version #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions atomfeed-client-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
<artifactId>atomfeed-client-spring</artifactId>
<packaging>jar</packaging>

<properties>
<spring.version>3.1.0.RELEASE</spring.version>
<log4jVersion>2.17.1</log4jVersion>
</properties>

<repositories>
<repository>
<id>spring-maven-release</id>
Expand Down Expand Up @@ -47,13 +42,13 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4jVersion}</version>
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4jVersion}</version>
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -64,13 +59,13 @@
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.7.1</version>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
<artifactId>javax.servlet-api</artifactId>
<version>${javaxServletApi.version}</version>
<scope>test</scope>
</dependency>
<!--
Make all spring dependencies provided
Expand Down Expand Up @@ -158,13 +153,13 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.6.1</version>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -186,7 +181,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<version>${mvnPlugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
Expand Down
24 changes: 8 additions & 16 deletions atomfeed-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<jdbc.username>root</jdbc.username>
<jdbc.password>admin</jdbc.password>
<jdbc.url>jdbc:h2:~/atomfeed;DATABASE_TO_UPPER=false</jdbc.url>
<log4jVersion>2.17.1</log4jVersion>
</properties>

<dependencies>
Expand All @@ -27,13 +26,13 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4jVersion}</version>
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4jVersion}</version>
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -64,19 +63,19 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.5</version>
<version>${mockitoCore.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<artifactId>javax.servlet-api</artifactId>
<version>${javaxServletApi.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -88,7 +87,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.174</version>
<version>${h2Databaes.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -104,7 +103,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<version>${mvnPlugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
Expand Down Expand Up @@ -185,13 +184,6 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.174</version>
</dependency>
</dependencies>
</profile>
</profiles>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ public void shouldProcessEventsWithoutFailures() throws URISyntaxException, SQLE

verify(eventWorker).process(argThat(new ArgumentMatcher<Event>() {
@Override
public boolean matches(Object o) {
return ((Event) o).getId().equals(entry1.getId()) && ((Event) o).getFeedUri().equals(feedLink);
public boolean matches(Event event) {
return ((Event) event).getId().equals(entry1.getId()) && ((Event) event).getFeedUri().equals(feedLink);
}
}));
verify(allMarkersMock).put(feedUri, entry1.getId(), new URI(feedLink));
verify(eventWorker).process(argThat(new ArgumentMatcher<Event>() {
@Override
public boolean matches(Object o) {
return ((Event) o).getId().equals(entry2.getId());
public boolean matches(Event event) {
return ((Event) event).getId().equals(entry2.getId());
}
}));
verify(allMarkersMock).put(feedUri, entry2.getId(), new URI(feedLink));
Expand Down Expand Up @@ -136,15 +136,15 @@ public void shouldProcessEventsAndNotUpdateMarkerIfFlagIsFalse() throws URISynta

verify(eventWorker).process(argThat(new ArgumentMatcher<Event>() {
@Override
public boolean matches(Object o) {
return ((Event) o).getId().equals(entry1.getId());
public boolean matches(Event event) {
return ((Event) event).getId().equals(entry1.getId());
}
}));
verify(allMarkersMock, Mockito.never()).put(feedUri, entry1.getId(), new URI(feedLink));
verify(eventWorker).process(argThat(new ArgumentMatcher<Event>() {
@Override
public boolean matches(Object o) {
return ((Event) o).getId().equals(entry2.getId());
public boolean matches(Event event) {
return ((Event) event).getId().equals(entry2.getId());
}
}));
verify(allMarkersMock, Mockito.never()).put(feedUri, entry2.getId(), new URI(feedLink));
Expand All @@ -155,7 +155,7 @@ public void shouldHandleFailedEventInCaseProcessingFailsForAnEvent() throws URIS
Feed feed = setupFeedWithTwoEvents();
when(allFeedsMock.getFor(feedUri)).thenReturn(feed);
when(allFailedEvents.getNumberOfFailedEvents(feedUri.toString())).thenReturn(0);
doThrow(Exception.class).when(eventWorker).process(any(Event.class));
doThrow(RuntimeException.class).when(eventWorker).process(any(Event.class));

FeedClient feedClient = new AtomFeedClient(allFeedsMock, allMarkersMock, allFailedEvents, new AtomFeedProperties(), transactionManager, feedUri, eventWorker);
feedClient.processEvents();
Expand Down Expand Up @@ -194,7 +194,7 @@ public void shouldStopProcessingEventsInBetweenWhenThereAreTooManyFailedEvents()
Feed feed = setupFeedWithTwoEvents();
when(allFeedsMock.getFor(feedUri)).thenReturn(feed);
when(allFailedEvents.getNumberOfFailedEvents(feedUri.toString())).thenReturn(maxFailedEvents - 1, maxFailedEvents);
doThrow(Exception.class).when(eventWorker).process(any(Event.class));
doThrow(RuntimeException.class).when(eventWorker).process(any(Event.class));

FeedClient feedClient = new AtomFeedClient(allFeedsMock, allMarkersMock, allFailedEvents, atomFeedProperties, transactionManager, feedUri, eventWorker);
feedClient.processEvents();
Expand Down
12 changes: 6 additions & 6 deletions atomfeed-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<artifactId>atomfeed-commons</artifactId>

<properties>
<log4jVersion>2.17.1</log4jVersion>
<commonsLangVersion>3.11</commonsLangVersion>
</properties>

<dependencies>
Expand All @@ -22,31 +22,31 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.5</version>
<version>${mockitoCore.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4jVersion}</version>
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4jVersion}</version>
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
<version>${commonsLangVersion}</version>
</dependency>

</dependencies>
Expand Down
25 changes: 9 additions & 16 deletions atomfeed-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<packaging>jar</packaging>

<properties>
<log4jVersion>2.17.1</log4jVersion>
<mavenResourcePlugin>3.2.0</mavenResourcePlugin>
</properties>

<!--<properties>-->
Expand All @@ -28,7 +28,7 @@
<repository>
<id>javax.transaction</id>
<name>Repository for javax transaction API</name>
<url>http://mvnrepository.com/artifact/javax.transaction/jta/1.1</url>
<url>https://mvnrepository.com/artifact/javax.transaction/jta/1.1</url>
</repository>
</repositories>

Expand All @@ -37,7 +37,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<version>${mavenResourcePlugin}</version>
<configuration>
<encoding>UTF-8</encoding>
<outputDirectory />
Expand Down Expand Up @@ -74,7 +74,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<version>${mavenJarPlugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
Expand Down Expand Up @@ -132,25 +132,25 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4jVersion}</version>
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4jVersion}</version>
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.5</version>
<version>${mockitoCore.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -168,7 +168,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.174</version>
<version>${h2Databaes.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -235,13 +235,6 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.174</version>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void shouldRetrieveRecentFeed() throws Exception {
public void shouldRetrieveEmptyFeedForWhenRecentFeedIsQueriedForWithNoEventsPresent() {
AllEventRecords eventRecords = mock(AllEventRecords.class);
feedGenerator = new NumberFeedGenerator(eventRecords, allEventRecordsOffsetMarkers, allChunkingEntries);
stub(eventRecords.getTotalCountForCategory(anyString())).toReturn(0);
when(eventRecords.getTotalCountForCategory(anyString())).thenReturn(0);
EventFeed feed = feedGenerator.getRecentFeed("");

Assert.assertEquals(new Integer(0), feed.getId());
Expand Down
Loading