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

[client-v2] Fix proxy configuration globally for the client #1694

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Conversation

chernser
Copy link
Contributor

@chernser chernser commented Jun 18, 2024

Summary

Proxy configuration is copied to client used by operations.

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added

@Paultagoras
Copy link
Contributor

Paultagoras commented Jun 18, 2024

I approved @chernser but could we modify the Proxy tests to tweak the condition we check for? It should be something like this now:

@Test(groups = { "integration" }, enabled = true)
    public void simpleDisabledProxyTest() throws Exception {
        String tableName = "simple_pojo_proxy_table";
        String createSQL = SamplePOJO.generateTableCreateSQL(tableName);
        System.out.println(createSQL);
        createTable(createSQL);

        client.register(SamplePOJO.class, SamplePOJO.generateTableSchema(tableName));
        List<Object> simplePOJOs = new ArrayList<>();

        for (int i = 0; i < 1000; i++) {
            simplePOJOs.add(new SamplePOJO());
        }
        proxy.disable();
        try {
            InsertResponse response = client.insert(tableName, simplePOJOs).get(30, TimeUnit.SECONDS);
        } catch (Exception e) {
            assertTrue(e.getMessage().contains("Operation has likely timed out."));
        }
    }

Copy link
Contributor

@mzitnik mzitnik left a comment

Choose a reason for hiding this comment

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

Approving but we still need tests for it @Paultagoras can you add

@mzitnik mzitnik merged commit b7b4544 into main Jun 18, 2024
58 checks passed
@Paultagoras Paultagoras deleted the fix_proxy branch June 18, 2024 15:04
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.

3 participants