spanner: Re-enable and unflake TestSessionDestroy

TestSessionDestroy was disabled as it was flaky. This CL fixes
the flakiness as:
1. The session pool now uses BatchCreateSessions to immediately
   start creating the MinOpened sessions when the pool is created,
   instead of letting the maintainer do this. This guarantees that
   the initial session creation has already started when the pool
   has been created.
2. By setting MinBurst=1, the take() method is guaranteed to wait
   for the initial session creation to finish instead of creating
   a new session, as the session creation is guaranteed to already
   have been started (see 1) and MaxBurst=1 limits the number of
   sessions in parallel creation to 1.

Change-Id: I661a4a4f20bc40abc0c19a5637295afef6a51637
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/47610
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jean de Klerk <deklerk@google.com>
diff --git a/spanner/session_test.go b/spanner/session_test.go
index 0f22479..5aa189a 100644
--- a/spanner/session_test.go
+++ b/spanner/session_test.go
@@ -601,22 +601,24 @@
 	}
 }
 
-// TODO(deklerk): Investigate why s.destroy(true) is flakey.
 // TestSessionDestroy tests destroying sessions.
 func TestSessionDestroy(t *testing.T) {
-	t.Skip("s.destroy(true) is flakey")
 	t.Parallel()
 	ctx := context.Background()
 	_, client, teardown := setupMockedTestServerWithConfig(t,
 		ClientConfig{
 			SessionPoolConfig: SessionPoolConfig{
 				MinOpened: 1,
+				MaxBurst:  1,
 			},
 		})
 	defer teardown()
 	sp := client.idleSessions
 
-	<-time.After(10 * time.Millisecond) // maintainer will create one session, we wait for it create session to avoid flakiness in test
+	// Creating a session pool with MinSessions=1 will automatically start the
+	// creation of 1 session when the session pool is created. As MaxBurst=1,
+	// the session pool will never create more than 1 session at a time, so the
+	// take() method will wait if the initial session has not yet been created.
 	sh, err := sp.take(ctx)
 	if err != nil {
 		t.Fatalf("cannot get session from session pool: %v", err)