Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CompositeByteBuf implements ByteBuf {
limit = components.get(components.size() - 1).endOffset;
}

CompositeByteBuf(final CompositeByteBuf from) {
private CompositeByteBuf(final CompositeByteBuf from) {
components = from.components;
position = from.position();
limit = from.limit();
Expand All @@ -58,7 +58,7 @@ class CompositeByteBuf implements ByteBuf {
@Override
public ByteBuf order(final ByteOrder byteOrder) {
if (byteOrder == ByteOrder.BIG_ENDIAN) {
throw new UnsupportedOperationException(format("Only %s is supported", ByteOrder.BIG_ENDIAN));
throw new UnsupportedOperationException(format("Only %s is supported", ByteOrder.LITTLE_ENDIAN));
}
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public ByteBuf limit(final int newLimit) {

@Override
public ByteBuf asReadOnly() {
return this; // TODO: do we need this method really? Netty ByteBuf does not have this concept
return new NettyByteBuf(proxied.retain().asReadOnly(), false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import com.mongodb.connection.SocketSettings
import com.mongodb.internal.connection.netty.NettyStreamFactory
import org.bson.BsonDocument
import org.bson.BsonInt32
import spock.lang.Ignore
import spock.lang.Specification

import java.util.concurrent.CountDownLatch
Expand All @@ -44,6 +43,7 @@ class CommandHelperSpecification extends Specification {
InternalConnection connection

def setup() {
InternalStreamConnection.setRecordEverything(true)
connection = new InternalStreamConnectionFactory(ClusterConnectionMode.SINGLE,
new NettyStreamFactory(SocketSettings.builder().build(), getSslSettings()),
getCredentialWithCache(), CLIENT_METADATA, [], LoggerSettings.builder().build(), null, getServerApi())
Expand All @@ -55,7 +55,6 @@ class CommandHelperSpecification extends Specification {
connection?.close()
}

@Ignore("JAVA-5982")
def 'should execute command asynchronously'() {
when:
BsonDocument receivedDocument = null
Expand Down