diff --git a/ProjectPlugins/CodexPlugin/CodexNode.cs b/ProjectPlugins/CodexPlugin/CodexNode.cs index d2438dd..9175606 100644 --- a/ProjectPlugins/CodexPlugin/CodexNode.cs +++ b/ProjectPlugins/CodexPlugin/CodexNode.cs @@ -13,8 +13,9 @@ namespace CodexPlugin string GetName(); CodexDebugResponse GetDebugInfo(); CodexDebugPeerResponse GetDebugPeer(string peerId); - CodexDebugBlockExchangeResponse GetDebugBlockExchange(); - CodexDebugRepoStoreResponse[] GetDebugRepoStore(); + // These debug methods are not available in master-line Codex. Use only for custom builds. + //CodexDebugBlockExchangeResponse GetDebugBlockExchange(); + //CodexDebugRepoStoreResponse[] GetDebugRepoStore(); ContentId UploadFile(TrackedFile file); TrackedFile? DownloadContent(ContentId contentId, string fileLabel = ""); void ConnectToPeer(ICodexNode node); diff --git a/Tests/CodexContinuousTests/Tests/TwoClientTest.cs b/Tests/CodexContinuousTests/Tests/TwoClientTest.cs index 4275202..596ea2b 100644 --- a/Tests/CodexContinuousTests/Tests/TwoClientTest.cs +++ b/Tests/CodexContinuousTests/Tests/TwoClientTest.cs @@ -57,8 +57,8 @@ namespace ContinuousTests.Tests private void LogRepoStore(ICodexNode codexNode) { - var response = codexNode.GetDebugRepoStore(); - Log.Log($"{codexNode.GetName()} has {string.Join(",", response.Select(r => r.cid))}"); + //var response = codexNode.GetDebugRepoStore(); + //Log.Log($"{codexNode.GetName()} has {string.Join(",", response.Select(r => r.cid))}"); } private void LogStoredBytes(ICodexNode node) @@ -90,8 +90,8 @@ namespace ContinuousTests.Tests private void LogBlockExchangeStatus(ICodexNode codexNode, string msg) { - var response = codexNode.GetDebugBlockExchange(); - Log.Log($"{codexNode.GetName()} {msg}: {JsonConvert.SerializeObject(response)}"); + //var response = codexNode.GetDebugBlockExchange(); + //Log.Log($"{codexNode.GetName()} {msg}: {JsonConvert.SerializeObject(response)}"); } } } diff --git a/Tests/CodexTests/BasicTests/BlockExchangeTests.cs b/Tests/CodexTests/BasicTests/BlockExchangeTests.cs index 72d7357..83f67d4 100644 --- a/Tests/CodexTests/BasicTests/BlockExchangeTests.cs +++ b/Tests/CodexTests/BasicTests/BlockExchangeTests.cs @@ -42,21 +42,22 @@ namespace CodexTests.BasicTests { foreach (var node in nodes) { - Time.Retry(() => AssertBlockExchangeIsEmpty(node), nameof(AssertExchangeIsEmpty)); + // API Call not available in master-line Codex image. + //Time.Retry(() => AssertBlockExchangeIsEmpty(node), nameof(AssertExchangeIsEmpty)); } } - private void AssertBlockExchangeIsEmpty(ICodexNode node) - { - var msg = $"BlockExchange for {node.GetName()}: "; - var response = node.GetDebugBlockExchange(); - foreach (var peer in response.peers) - { - var activeWants = peer.wants.Where(w => !w.cancel).ToArray(); - Assert.That(activeWants.Length, Is.EqualTo(0), msg + "thinks a peer has active wants."); - } - Assert.That(response.taskQueue, Is.EqualTo(0), msg + "has tasks in queue."); - Assert.That(response.pendingBlocks, Is.EqualTo(0), msg + "has pending blocks."); - } + //private void AssertBlockExchangeIsEmpty(ICodexNode node) + //{ + // var msg = $"BlockExchange for {node.GetName()}: "; + // var response = node.GetDebugBlockExchange(); + // foreach (var peer in response.peers) + // { + // var activeWants = peer.wants.Where(w => !w.cancel).ToArray(); + // Assert.That(activeWants.Length, Is.EqualTo(0), msg + "thinks a peer has active wants."); + // } + // Assert.That(response.taskQueue, Is.EqualTo(0), msg + "has tasks in queue."); + // Assert.That(response.pendingBlocks, Is.EqualTo(0), msg + "has pending blocks."); + //} } }