diff --git a/src/intTest/java/com/surrealdb/refactor/DemoScenarioTest.java b/src/intTest/java/com/surrealdb/refactor/DemoScenarioTest.java index b15fa219..8fd8bd43 100644 --- a/src/intTest/java/com/surrealdb/refactor/DemoScenarioTest.java +++ b/src/intTest/java/com/surrealdb/refactor/DemoScenarioTest.java @@ -12,11 +12,13 @@ import com.surrealdb.refactor.types.Value; import java.net.URI; import java.util.List; + +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; public class DemoScenarioTest extends BaseIntegrationTest { @Test - // @Disabled("Functionality is unimplemented, but having the tests shows the design") + @Disabled("Functionality is unimplemented, but having the tests shows the design") public void testDemoScenario() throws Exception { // Setup URI address = diff --git a/src/main/java/com/surrealdb/refactor/driver/SurrealDBWebsocketClientProtocolHandler.java b/src/main/java/com/surrealdb/refactor/driver/SurrealDBWebsocketClientProtocolHandler.java index 66d70a73..25c0abd9 100644 --- a/src/main/java/com/surrealdb/refactor/driver/SurrealDBWebsocketClientProtocolHandler.java +++ b/src/main/java/com/surrealdb/refactor/driver/SurrealDBWebsocketClientProtocolHandler.java @@ -101,6 +101,9 @@ public Future signin(String requestID, Credentials credentials) { Promise promise = channel.eventLoop().newPromise(); Promise popped = requestMap.putIfAbsent(requestID, promise); if (popped != null) { + // Reinsert whatever we removed; This is actually quite problematic, and we should do a + // contains check before in case + // There will always be race conditions without locks on this requestMap.put(requestID, popped); throw new UnhandledSurrealDBNettyState( "this should probably be a different error as we know what is happening",