nsAstro commented on code in PR #29732:
URL: https://github.com/apache/airflow/pull/29732#discussion_r1126582422
##########
tests/providers/amazon/aws/hooks/test_emr.py:
##########
@@ -191,6 +197,9 @@ def test_get_cluster_id_by_name(self):
assert no_match is None
+ with pytest.raises(AirflowException):
+ hook.get_cluster_id_by_name("test_cluster0", ["RUNNING",
"WAITING", "BOOTSTRAPPING"])
+
Review Comment:
I totally understand, I just am not sure how to force a given clusterName to
be on the second page. Can I assume that even if the listClusters API provides
an unordered response, it will provide that same order in subsequent queries?
Then I can do a regular listClusters and fetch a cluster on the second page.
But if the ordering is not consistent, I don't really have a surefire way to
guarantee that the clusterName is on the second page. I could increase the
number of clusters (<1000) to make the probability very high.
I'm happy to add tests, even for testing duplicate clusterNames which wasn't
part of this PR. I'm just not too familiar with the EMR API, so I'm looking for
some guidance.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]