Skip to content

Commit

Permalink
Upgraded to new Azure SDK Versions. Fixed Unit test to include new Id…
Browse files Browse the repository at this point in the history
…entity code (#652)
  • Loading branch information
mrm9084 authored Mar 27, 2020
1 parent c9ad4b8 commit 6124db4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spring-cloud-azure-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
<javax.jms-api.version>2.0.1</javax.jms-api.version>
<qpid-jms-client.version>0.43.0</qpid-jms-client.version>
<okhttp3.version>3.11.0</okhttp3.version>
<azure-core.version>1.2.0</azure-core.version>
<azure-data-appconfiguration.version>1.0.1</azure-data-appconfiguration.version>
<azure-identity.version>1.0.2</azure-identity.version>
<azure-security-keyvault-secrets.version>4.1.0</azure-security-keyvault-secrets.version>
<azure-core-http-netty.version>1.2.0</azure-core-http-netty.version>
<azure-core.version>1.3.0</azure-core.version>
<azure-data-appconfiguration.version>1.1.0</azure-data-appconfiguration.version>
<azure-identity.version>1.0.4</azure-identity.version>
<azure-security-keyvault-secrets.version>4.1.1</azure-security-keyvault-secrets.version>
<azure-core-http-netty.version>1.3.0</azure-core-http-netty.version>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.azure.core.http.HttpRequest;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedResponse;
import com.azure.core.util.IterableStream;
import com.azure.storage.queue.QueueAsyncClient;
import com.azure.storage.queue.models.QueueMessageItem;
import com.azure.storage.queue.models.QueueStorageException;
Expand All @@ -24,6 +25,8 @@
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.messaging.Message;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.time.Duration;
Expand Down Expand Up @@ -98,6 +101,12 @@ public HttpRequest getRequest() {
public void close() {

}

@Override
public IterableStream<QueueMessageItem> getElements() {
Flux<QueueMessageItem> flux = Flux.just(queueMessage);
return new IterableStream<QueueMessageItem>(flux);
}
};
when(this.mockClientFactory.getOrCreateQueueClient(eq(destination))).thenReturn(this.mockClient);
when(this.mockClient.receiveMessages(eq(1), any()))
Expand Down

0 comments on commit 6124db4

Please sign in to comment.