Code review comment: Do we need this short timeout? We already have a TIMEOUT constant defined that can be reused. You can bump the seconds up if you need. https://github.com/Azure/azure-sdk-for-java/blob/0902c492de42ed25164e22fc55ec388041ca12df/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSessionManagerTest.java#L69

Code under review:
void singleUnnamedSessionCleanupAfterTimeout() {
        
        Duration shortTimeout =  Duration.ofSeconds(15);
        ReceiverOptions receiverOptions = new ReceiverOptions(ServiceBusReceiveMode.PEEK_LOCK, 1, MAX_LOCK_RENEWAL, false, null,
            2);
        sessionManager = new ServiceBusSessionManager(ENTITY_PATH, ENTITY_TYPE, connectionProcessor,
            tracerProvider, messageSerializer, receiverOptions);

        final String sessionId = "session-1";
        final String lockToken = "a-lock-token";
        final String linkName = "my-link-name";
        final OffsetDateTime sessionLockedUntil = OffsetDateTime.now().plus(Duration.ofSeconds(30));

        final Message message = mock(Message.class);
        final ServiceBusReceivedMessage receivedMessage = mock(ServiceBusReceivedMessage.class);

        when(messageSerializer.deserialize(message, ServiceBusReceivedMessage.class)).thenReturn(receivedMessage);
        when(receivedMessage.getSessionId()).thenReturn(sessionId);
        when(receivedMessage.getLockToken()).thenReturn(lockToken);

        when(amqpReceiveLink.getLinkName()).thenReturn(linkName);
        when(amqpReceiveLink.getSessionId()).thenReturn(Mono.just(sessionId));
        when(amqpReceiveLink.getSessionLockedUntil())
            .thenAnswer(invocation -> Mono.just(sessionLockedUntil));
        when(connection.createReceiveLink(anyString(), eq(ENTITY_PATH), any(ServiceBusReceiveMode.class), isNull(),
            any(MessagingEntityType.class), isNull())).thenReturn(Mono.just(amqpReceiveLink));

        
        StepVerifier.create(sessionManager.receive())
            .then(() -> {
                messageSink.next(message);
            })
            .assertNext(context -> {
                assertMessageEquals(sessionId, receivedMessage, context);
            })
            .then(() -> {
                try {
                    assertNotNull(sessionManager.getLinkName(sessionId));
                    TimeUnit.SECONDS.sleep(TIMEOUT.getSeconds());
                    assertNull(sessionManager.getLinkName(sessionId));
                } catch (InterruptedException e) { }

            })
            .thenCancel()
            .verify(shortTimeout);
    }

Line commented on: Duration shortTimeout =  Duration.ofSeconds(15);

Revised code:
void singleUnnamedSessionCleanupAfterTimeout() {
        
        ReceiverOptions receiverOptions = new ReceiverOptions(ServiceBusReceiveMode.PEEK_LOCK, 1, MAX_LOCK_RENEWAL, false, null,
            2);
        sessionManager = new ServiceBusSessionManager(ENTITY_PATH, ENTITY_TYPE, connectionProcessor,
            tracerProvider, messageSerializer, receiverOptions);

        final String sessionId = "session-1";
        final String lockToken = "a-lock-token";
        final String linkName = "my-link-name";
        final OffsetDateTime sessionLockedUntil = OffsetDateTime.now().plus(Duration.ofSeconds(30));

        final Message message = mock(Message.class);
        final ServiceBusReceivedMessage receivedMessage = mock(ServiceBusReceivedMessage.class);

        when(messageSerializer.deserialize(message, ServiceBusReceivedMessage.class)).thenReturn(receivedMessage);
        when(receivedMessage.getSessionId()).thenReturn(sessionId);
        when(receivedMessage.getLockToken()).thenReturn(lockToken);

        when(amqpReceiveLink.getLinkName()).thenReturn(linkName);
        when(amqpReceiveLink.getSessionId()).thenReturn(Mono.just(sessionId));
        when(amqpReceiveLink.getSessionLockedUntil())
            .thenAnswer(invocation -> Mono.just(sessionLockedUntil));
        when(connection.createReceiveLink(anyString(), eq(ENTITY_PATH), any(ServiceBusReceiveMode.class), isNull(),
            any(MessagingEntityType.class), isNull())).thenReturn(Mono.just(amqpReceiveLink));

        
        StepVerifier.create(sessionManager.receive())
            .then(() -> {
                messageSink.next(message);
            })
            .assertNext(context -> {
                assertMessageEquals(sessionId, receivedMessage, context);
            })
            .then(() -> {
                try {
                    assertNotNull(sessionManager.getLinkName(sessionId));
                    TimeUnit.SECONDS.sleep(TIMEOUT.getSeconds());
                    assertNull(sessionManager.getLinkName(sessionId));
                } catch (InterruptedException e) { }

            })
            .thenCancel()
            .verify(TIMEOUT);
    }