message: Switch OverrideThreadpoolTest to use TF combinations
diff: @@ -28,14 +28,13 @@ from tensorflow.python.data.experimental.ops import threadpool
  from tensorflow.python.data.experimental.ops import unique
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  +from tensorflow.python.framework import combinations
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  -from tensorflow.python.framework import test_util
  from tensorflow.python.ops import script_ops
  from tensorflow.python.platform import test
  -@test_util.run_all_in_graph_and_eager_modes
  class OverrideThreadpoolTest(test_base.DatasetTestBase,
  parameterized.TestCase):
  @@ -70,17 +69,15 @@ class OverrideThreadpoolTest(test_base.DatasetTestBase,
  # perform work.
  self.assertLessEqual(len(thread_ids), num_threads)
  - @parameterized.named_parameters(
  - ("1", 1, None),
  - ("2", 2, None),
  - ("3", 4, None),
  - ("4", 8, None),
  - ("5", 16, None),
  - ("6", 4, -1),
  - ("7", 4, 0),
  - ("8", 4, 1),
  - ("9", 4, 4),
  - )
  + @combinations.generate(
  + combinations.times(
  + test_base.default_test_combinations(),
  + combinations.combine(
  + num_threads=[1, 2, 4, 8, 16], max_intra_op_parallelism=[None]) +
  + combinations.combine(
  + num_threads=[4], max_intra_op_parallelism=[0, 1, 4]) +
  + combinations.combine(
  + num_threads=[5], max_intra_op_parallelism=[-1])))
  def testNumThreadsDeprecated(self, num_threads, max_intra_op_parallelism):
  def override_threadpool_fn(dataset):
  @@ -93,20 +90,17 @@ class OverrideThreadpoolTest(test_base.DatasetTestBase,
  self._testNumThreadsHelper(num_threads, override_threadpool_fn)
  - @parameterized.named_parameters(
  - ("1", 1, None),
  - ("2", 2, None),
  - ("3", 4, None),
  - ("4", 8, None),
  - ("5", 16, None),
  - ("6", None, 0),
  - ("7", None, 1),
  - ("8", None, 4),
  - ("9", 4, 0),
  - ("10", 4, 1),
  - ("11", 4, 4),
  - ("12", None, None),
  - )
  + @combinations.generate(
  + combinations.times(
  + test_base.default_test_combinations(),
  + combinations.combine(
  + num_threads=[1, 2, 4, 8, 16], max_intra_op_parallelism=[None]) +
  + combinations.combine(
  + num_threads=[None], max_intra_op_parallelism=[0, 1, 4]) +
  + combinations.combine(
  + num_threads=[4], max_intra_op_parallelism=[0, 1, 4]) +
  + combinations.combine(
  + num_threads=[None], max_intra_op_parallelism=[None])))
  def testNumThreads(self, num_threads, max_intra_op_parallelism):
  def override_threadpool_fn(dataset):
  @@ -121,6 +115,7 @@ class OverrideThreadpoolTest(test_base.DatasetTestBase,
  self._testNumThreadsHelper(num_threads, override_threadpool_fn)
  + @combinations.generate(test_base.default_test_combinations())
  def testMaxIntraOpParallelismAsGraphDefInternal(self):
  dataset = dataset_ops.Dataset.from_tensors(0)
  dataset = dataset_ops._MaxIntraOpParallelismDataset(dataset, 1)
  