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

Servicebus track2 live test receive renew lock #12737

Merged
merged 26 commits into from
Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5c3cf98
Increment package version after release of com.azure azure-messaging-…
azure-sdk May 8, 2020
39b9a1a
resolve merge conflict
May 12, 2020
f9cc7d2
Merge branch 'azure-sdk-increment-package-version-servicebus-386162'
May 12, 2020
3a4b16f
merge master
May 13, 2020
b67ac9b
Merge branch 'master' of github.com:hemanttanwar/azure-sdk-for-java
May 13, 2020
510e76c
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
May 20, 2020
663dac4
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 5, 2020
2962fab
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 8, 2020
d418224
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 9, 2020
6a9dc35
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 9, 2020
d0d0d88
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 10, 2020
80bcfd7
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 11, 2020
136c66a
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 17, 2020
ed8488a
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 18, 2020
874767a
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 24, 2020
e4c98cc
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 26, 2020
964c1b6
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 28, 2020
4aa1fcc
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 28, 2020
9a962a8
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jun 29, 2020
b0bf58e
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jul 1, 2020
5585b23
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Jul 1, 2020
adedc0c
separating resource between test
Jul 2, 2020
607d6c6
Fixing test
Jul 2, 2020
3810785
live test fix
Jul 3, 2020
62c253c
formatting change
Jul 3, 2020
e358f68
Fix checkstyle issue
Jul 3, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ void receiveAndRenewLock(MessagingEntityType entityType) {
String.format("Updated lock is not after the initial Lock. updated: [%s]. initial:[%s]",
lockedUntil, initialLock));

assertEquals(receivedMessage.getLockedUntil(), lockedUntil);
})
.verifyComplete();
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
import org.junit.jupiter.params.provider.MethodSource;
import reactor.core.publisher.Mono;

import java.time.Duration;
import java.time.Instant;
Expand Down Expand Up @@ -114,26 +113,20 @@ void multipleReceiveByOneSubscriberMessageTimeout(MessagingEntityType entityType
final int maxMessages = 2;
final int totalReceive = 2;
final Duration shortTimeOut = Duration.ofSeconds(7);
final Duration longTimeOut = Duration.ofSeconds(10);

final String messageId = UUID.randomUUID().toString();
List<ServiceBusMessage> messageList = new ArrayList<>();
for (int i = 0; i < totalReceive * maxMessages; ++i) {
messageList.add(getMessage(messageId, isSessionEnabled));
}

Mono.just(true)
.delayElement(longTimeOut)
.map(aBoolean -> {
sendMessages(messageList);
return aBoolean;
})
.subscribe();
// Act & Assert
IterableStream<ServiceBusReceivedMessageContext> messages = receiver.receiveMessages(maxMessages, shortTimeOut);
long received = messages.stream().count();
assertEquals(0, received);

sendMessages(messageList);

int receivedMessageCount;
int totalReceivedCount = 0;
for (int i = 0; i < totalReceive; ++i) {
Expand Down