Fix optimizer_context OSS test
Fix optimizer_context OSS test

Summary:
This will fix the test by querying how many instances of the optimizer are already created.
Because OSS tests doesn't run in isolation causing number of created instances of optimizer to be >= 0.

Reviewed By: akyrola

Differential Revision:
D5462433

Tags: easy

fbshipit-source-id: 7a9ab4fe5345f5d5138abb461ba7a990d9ace840

pietern/caffe2,Yangqing/caffe2,davinwang/caffe2,bwasti/caffe2,bwasti/caffe2,pietern/caffe2,davinwang/caffe2,Yangqing/caffe2,davinwang/caffe2,pietern/caffe2,xzturn/caffe2,sf-wind/caffe2,sf-wind/caffe2,sf-wind/caffe2,pietern/caffe2,xzturn/caffe2,bwasti/caffe2,sf-wind/caffe2,xzturn/caffe2,davinwang/caffe2,bwasti/caffe2,davinwang/caffe2,xzturn/caffe2,caffe2/caffe2,sf-wind/caffe2,Yangqing/caffe2,pietern/caffe2,Yangqing/caffe2,Yangqing/caffe2,xzturn/caffe2,bwasti/caffe2