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

Implement connect timeout & close timeout in Java, remove connection timeouts #2321

Merged
merged 10 commits into from
Jun 20, 2024

Conversation

bernardnormier
Copy link
Member

This PR implement ConnectTimeout and CloseTimeout in Java, and also removes connection timeouts (like already done in C# and C++).

@@ -2,230 +2,226 @@

using System.Diagnostics;

namespace Ice
namespace Ice.timeout;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just updated the namespace in this file.


TimeoutPrx timeout = TimeoutPrx.checkedCast(obj);
test(timeout != null);
TimeoutPrx timeout = TimeoutPrx.uncheckedCast(communicator.stringToProxy(sref));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be replaced by createProxy.

Copy link
Member

@pepone pepone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, there was a hang with the metrics test on Windows CI not sure if it is related.

_removeFromFactory = removeFromFactory;
_warn = initData.properties.getIcePropertyAsInt("Ice.Warn.Connections") > 0;
_warnUdp =
instance.initializationData().properties.getIcePropertyAsInt("Ice.Warn.Datagrams") > 0;
_cacheBuffers = instance.cacheMessageBuffers();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was no longer used.

The previous dispatch pipeline removed all dispatch-side caching.

}
out.println("ok");

out.print("testing close timeout... ");
out.flush();
{
TimeoutPrx to = TimeoutPrx.uncheckedCast(obj.ice_timeout(250 * mult));
com.zeroc.Ice.Connection connection = connect(to);
var connection = connect(timeout);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to use the connect wrapper, we now have 1s connect timeout.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed. Note that this is not a great test - it doesn't test the CloseTimeout.

@bernardnormier bernardnormier merged commit 73d0882 into zeroc-ice:main Jun 20, 2024
16 checks passed
@bernardnormier bernardnormier deleted the timeout3 branch December 9, 2024 17:09
InsertCreativityHere pushed a commit to InsertCreativityHere/compiler-comparison that referenced this pull request Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants