@@ -66,78 +66,78 @@ public void sendResponse(Exception exception) {
6666 }
6767
6868 try {
69+ // FIXME: this should catch the error but fails instead
70+ /*
6971 try (
7072 EsqlQueryResponse resp = runQuery(
71- "FROM logs-*, c*:logs-* | EVAL lookup_key = v | LOOKUP JOIN values_lookup ON lookup_key" ,
73+ "FROM c*:logs-* | EVAL lookup_key = v | LOOKUP JOIN values_lookup ON lookup_key",
7274 randomBoolean()
7375 )
7476 ) {
7577 var columns = resp.columns().stream().map(ColumnInfoImpl::name).toList();
7678 assertThat(columns, hasItems("lookup_key", "lookup_name", "lookup_tag", "v", "tag"));
7779
7880 List<List<Object>> values = getValuesList(resp);
79- assertThat (values , hasSize (10 ));
81+ assertThat(values, hasSize(0));
82+
8083 EsqlExecutionInfo executionInfo = resp.getExecutionInfo();
8184
82- var localCluster = executionInfo .getCluster (LOCAL_CLUSTER );
83- assertThat (localCluster .getStatus (), equalTo (EsqlExecutionInfo .Cluster .Status .SUCCESSFUL ));
8485 var remoteCluster = executionInfo.getCluster(REMOTE_CLUSTER_1);
8586 assertThat(remoteCluster.getStatus(), equalTo(EsqlExecutionInfo.Cluster.Status.SKIPPED));
8687 assertThat(remoteCluster.getFailures(), not(empty()));
8788 var failure = remoteCluster.getFailures().get(0);
88- // FIXME: this produces a wrong message currently
89- // assertThat(failure.reason(), containsString(simulatedFailure.getMessage()));
90- assertThat (failure .reason (), containsString ("lookup index [values_lookup] is not available in remote cluster [cluster-a]" ));
91- }
89+ assertThat(failure.reason(), containsString(simulatedFailure.getMessage()));
90+ } */
9291
9392 try (
9493 EsqlQueryResponse resp = runQuery (
95- "FROM logs-*,*:logs-* | EVAL lookup_key = v | LOOKUP JOIN values_lookup ON lookup_key" ,
94+ "FROM logs-*,c *:logs-* | EVAL lookup_key = v | LOOKUP JOIN values_lookup ON lookup_key" ,
9695 randomBoolean ()
9796 )
9897 ) {
9998 var columns = resp .columns ().stream ().map (ColumnInfoImpl ::name ).toList ();
10099 assertThat (columns , hasItems ("lookup_key" , "lookup_name" , "lookup_tag" , "v" , "tag" ));
101100
102101 List <List <Object >> values = getValuesList (resp );
103- assertThat (values , hasSize (20 ));
102+ assertThat (values , hasSize (10 ));
104103 EsqlExecutionInfo executionInfo = resp .getExecutionInfo ();
105104
106105 var localCluster = executionInfo .getCluster (LOCAL_CLUSTER );
107106 assertThat (localCluster .getStatus (), equalTo (EsqlExecutionInfo .Cluster .Status .SUCCESSFUL ));
108107 var remoteCluster = executionInfo .getCluster (REMOTE_CLUSTER_1 );
109108 assertThat (remoteCluster .getStatus (), equalTo (EsqlExecutionInfo .Cluster .Status .SKIPPED ));
110- var remoteCluster2 = executionInfo .getCluster (REMOTE_CLUSTER_2 );
111- assertThat (remoteCluster2 .getStatus (), equalTo (EsqlExecutionInfo .Cluster .Status .SUCCESSFUL ));
112109 assertThat (remoteCluster .getFailures (), not (empty ()));
113110 var failure = remoteCluster .getFailures ().get (0 );
114111 // FIXME: this produces a wrong message currently
115112 // assertThat(failure.reason(), containsString(simulatedFailure.getMessage()));
116113 assertThat (failure .reason (), containsString ("lookup index [values_lookup] is not available in remote cluster [cluster-a]" ));
117114 }
118115
119- // FIXME: this should work but fails
120- /*
121116 try (
122117 EsqlQueryResponse resp = runQuery (
123- "FROM c *:logs-* | EVAL lookup_key = v | LOOKUP JOIN values_lookup ON lookup_key",
118+ "FROM logs-*, *:logs-* | EVAL lookup_key = v | LOOKUP JOIN values_lookup ON lookup_key" ,
124119 randomBoolean ()
125120 )
126121 ) {
127122 var columns = resp .columns ().stream ().map (ColumnInfoImpl ::name ).toList ();
128123 assertThat (columns , hasItems ("lookup_key" , "lookup_name" , "lookup_tag" , "v" , "tag" ));
129124
130125 List <List <Object >> values = getValuesList (resp );
131- assertThat(values, hasSize(0));
132-
126+ assertThat (values , hasSize (20 ));
133127 EsqlExecutionInfo executionInfo = resp .getExecutionInfo ();
134128
129+ var localCluster = executionInfo .getCluster (LOCAL_CLUSTER );
130+ assertThat (localCluster .getStatus (), equalTo (EsqlExecutionInfo .Cluster .Status .SUCCESSFUL ));
135131 var remoteCluster = executionInfo .getCluster (REMOTE_CLUSTER_1 );
136132 assertThat (remoteCluster .getStatus (), equalTo (EsqlExecutionInfo .Cluster .Status .SKIPPED ));
133+ var remoteCluster2 = executionInfo .getCluster (REMOTE_CLUSTER_2 );
134+ assertThat (remoteCluster2 .getStatus (), equalTo (EsqlExecutionInfo .Cluster .Status .SUCCESSFUL ));
137135 assertThat (remoteCluster .getFailures (), not (empty ()));
138136 var failure = remoteCluster .getFailures ().get (0 );
139- assertThat(failure.reason(), containsString(simulatedFailure.getMessage()));
140- } */
137+ // FIXME: this produces a wrong message currently
138+ // assertThat(failure.reason(), containsString(simulatedFailure.getMessage()));
139+ assertThat (failure .reason (), containsString ("lookup index [values_lookup] is not available in remote cluster [cluster-a]" ));
140+ }
141141
142142 // now fail
143143 setSkipUnavailable (REMOTE_CLUSTER_1 , false );
0 commit comments