@@ -42,7 +42,7 @@ func TestMNISTRayJobMCADRayCluster(t *testing.T) {
4242 mnist , err := scripts .ReadFile ("mnist.py" )
4343 test .Expect (err ).NotTo (HaveOccurred ())
4444
45- configMap := & corev1.ConfigMap {
45+ mnistScript := & corev1.ConfigMap {
4646 TypeMeta : metav1.TypeMeta {
4747 APIVersion : corev1 .SchemeGroupVersion .String (),
4848 Kind : "ConfigMap" ,
@@ -56,8 +56,9 @@ func TestMNISTRayJobMCADRayCluster(t *testing.T) {
5656 },
5757 Immutable : Ptr (true ),
5858 }
59- configMap , err = test .Client ().Core ().CoreV1 ().ConfigMaps (namespace .Name ).Create (test .Ctx (), configMap , metav1.CreateOptions {})
59+ mnistScript , err = test .Client ().Core ().CoreV1 ().ConfigMaps (namespace .Name ).Create (test .Ctx (), mnistScript , metav1.CreateOptions {})
6060 test .Expect (err ).NotTo (HaveOccurred ())
61+ test .T ().Logf ("Created ConfigMap %s/%s successfully" , mnistScript .Namespace , mnistScript .Name )
6162
6263 // RayCluster
6364 rayCluster := & rayv1alpha1.RayCluster {
@@ -126,7 +127,7 @@ func TestMNISTRayJobMCADRayCluster(t *testing.T) {
126127 VolumeSource : corev1.VolumeSource {
127128 ConfigMap : & corev1.ConfigMapVolumeSource {
128129 LocalObjectReference : corev1.LocalObjectReference {
129- Name : configMap .Name ,
130+ Name : mnistScript .Name ,
130131 },
131132 },
132133 },
@@ -212,9 +213,11 @@ func TestMNISTRayJobMCADRayCluster(t *testing.T) {
212213 },
213214 }
214215
215- _ , err = test .Client ().MCAD ().ArbV1 ().AppWrappers (namespace .Name ).Create (aw )
216+ aw , err = test .Client ().MCAD ().ArbV1 ().AppWrappers (namespace .Name ).Create (aw )
216217 test .Expect (err ).NotTo (HaveOccurred ())
218+ test .T ().Logf ("Created MCAD %s/%s successfully" , aw .Namespace , aw .Name )
217219
220+ test .T ().Logf ("Waiting for MCAD %s/%s to be running" , aw .Namespace , aw .Name )
218221 test .Eventually (AppWrapper (test , namespace , aw .Name ), TestTimeoutMedium ).
219222 Should (WithTransform (AppWrapperState , Equal (mcadv1beta1 .AppWrapperStateActive )))
220223
@@ -249,12 +252,15 @@ func TestMNISTRayJobMCADRayCluster(t *testing.T) {
249252 }
250253 rayJob , err = test .Client ().Ray ().RayV1alpha1 ().RayJobs (namespace .Name ).Create (test .Ctx (), rayJob , metav1.CreateOptions {})
251254 test .Expect (err ).NotTo (HaveOccurred ())
255+ test .T ().Logf ("Created RayJob %s/%s successfully" , rayJob .Namespace , rayJob .Name )
252256
257+ test .T ().Logf ("Waiting for RayJob %s/%s to complete successfully" , rayJob .Namespace , rayJob .Name )
253258 test .Eventually (RayJob (test , namespace , rayJob .Name ), TestTimeoutLong ).
254259 Should (WithTransform (RayJobStatus , Equal (rayv1alpha1 .JobStatusSucceeded )))
255260
256261 rayJob , err = test .Client ().Ray ().RayV1alpha1 ().RayJobs (namespace .Name ).Get (test .Ctx (), rayJob .Name , metav1.GetOptions {})
257262 test .Expect (err ).NotTo (HaveOccurred ())
258263
264+ test .T ().Logf ("Printing RayJob %s/%s logs" , rayJob .Namespace , rayJob .Name )
259265 test .T ().Log (GetRayJobLogs (test , rayJob ))
260266}
0 commit comments